LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-02-2009, 09:08 AM   #1
qmqmqm
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
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
 
Old 04-02-2009, 09:34 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 04-02-2009, 09:35 AM   #3
qmqmqm
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Or is there a way to invoke an Expect script from another, with some arguments?

Thanks,

Tom
 
Old 04-02-2009, 09:47 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
http://wiki.tcl.tk/1039
 
Old 04-02-2009, 05:36 PM   #5
qmqmqm
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
Thanks Chris.

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My "expect" script is not working... Won't "send" commands... edomingox Programming 4 04-02-2009 03:25 PM
cant "source" bash script with arguments (PATH updating) monkey_king Linux - General 5 12-30-2008 04:34 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Passing a text file to the command line as arguments wimnat Linux - General 2 12-05-2005 08:09 AM
passing a list of arguments to a command hdagelic Linux - General 2 05-09-2005 09:30 AM


All times are GMT -5. The time now is 03:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration