LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   EXPECT/TCL: the "source" command and passing arguments (http://www.linuxquestions.org/questions/programming-9/expect-tcl-the-source-command-and-passing-arguments-716329/)

qmqmqm 04-02-2009 09:08 AM

EXPECT/TCL: the "source" command and passing arguments
 
Does anyone know how to pass parameters to Expect script if it is "source"ed from another Expect script?

For example, in an Expect script I have:

source "myOtherScript myArgument"

However I get error:

couldn't read file "myOtherScript myArgument": no such file or directory


Google did not give me anything useful...


Thanks a lot!

Tom

acid_kewpie 04-02-2009 09:34 AM

source takes one file and inserts it to the current script, like an include. it doesn't *run* the script, like you seem to be thinking it will there.

qmqmqm 04-02-2009 09:35 AM

Or is there a way to invoke an Expect script from another, with some arguments?

Thanks,

Tom

acid_kewpie 04-02-2009 09:47 AM

http://wiki.tcl.tk/1039

qmqmqm 04-02-2009 05:36 PM

Quote:

Originally Posted by acid_kewpie (Post 3496115)

Thanks Chris.

BTW another guru has informed me of this one:
http://wiki.tcl.tk/10025


All times are GMT -5. The time now is 09:27 PM.