473,503 Members | 10,245 Online
Bytes | Software Development & Data Engineering Community
+ 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 2960
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
7271
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
4056
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
1859
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
2481
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
7683
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
2728
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
9433
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
2086
by: cmdolcet69 | last post by:
Can anyone tell me if its possible to do multiple event args in vb.net?
3
12039
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
7193
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
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
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...
1
4992
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
3160
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
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.