473,472 Members | 2,153 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to pass multiple args to expect spawn

7 New Member
Hi,

I am trying to write a small script to spwan a perl script with some specific args to perl script.
Expand|Select|Wrap|Line Numbers
  1. #! /usr/bin/expect -f  
  2. set args " -abstract=\"AutoEM : FIX MONITORING TAR TO OHSOAP\"  -queuename=xxx -product=111 -note=\"A tar created for broken monitoring\""   
  3.  
  4. eval spawn ./autosr $args  
  5. #expect "Enter pass key :" 
  6. #send "xxxx\r" 
  7. #expect eof 
  8. interact 
  9. exit 
but I am getting the error :
Error: Following arguments were not used due to wrong syntax
:
FIX
MONITORING
TAR
TO
OHSOAP"
tar
created
for
broken
monitoring"

that means it is not taking these args and not passing them to perl script.
Any help will be highly appreciated.

Thanks in advance
ritz
Sep 4 '08 #1
1 2959
numberwhun
3,509 Recognized Expert Moderator Specialist
Since this is an 'Expect' issue and not a Perl issue, I am going move this over to the Miscellaneous forum, as we don't have a forum for Expect specifically.

Regards,

Moderator
Sep 4 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Rigga | last post by:
Hi I would like to pass a variable to an external program i.e. os.system('cd $variable') However this doesnt work, I cant figure it out, any ideas? Cheers
0
by: Kevin Cheramie | last post by:
I'm unsure how to break down and use what is returned by expect in the rest of my script. I want to issue a command and split the results of that command into several different variables. I then...
3
by: googleboy | last post by:
Hi there. I have defined a class called Item with several (about 30 I think) different attributes (is that the right word in this context?). An abbreviated example of the code for this is: ...
5
by: Jeremy | last post by:
I have a core VB service that monitors a database, and based on data in the records will execute code to send email notifications. Problem: I don't want my main program code to halt and wait for...
2
by: vmalhotra | last post by:
Hi I am new in python scripting. I want to open a Multiple telnet session through once script. In other way i can tell i want to open two linux consoles through one script. I wrote one...
1
by: graphman | last post by:
I have a perl script that I'm calling using php's shell_exec that uses an expect module to go to another system to pull tiff files. The php perl combination works great when I launch from the...
1
by: skillzero | last post by:
Is there a portable way to pass a va_list as a parameter to another function taking a variable argument list? I have a function that takes a printf-like format string and I'd like to use...
27
by: cmdolcet69 | last post by:
Can anyone tell me if its possible to do multiple event args in vb.net?
3
by: bollweevil | last post by:
Hello Everyone, I do Django web development on my Mac at home, and then I rsync the files with the Ubuntu web server. I want to write one single bash shell script that rsyncs the files and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.