RE: Need help with expect script

2000-09-05 Thread Rick Teudt
> Yeah it is possible.. > expect wants a tcl syntax. With tcl you can pass arguments to the > script but non with $1, $2 like in bash. > The argument is stored in a variable named argv (see man expect for > details). > > In your case you should only make the change $1>$argv Thanks, works

Re: Need help with expect script

2000-09-05 Thread Marco Presi
On Tue, 5 Sep 2000, Rick Teudt wrote: > I am trying to figure out how to pass a command-line argument into an expect > script. > > For example, suppose I have a script called update.exp. The first few lines > of update.exp are as follows: > > #!/usr/bin/expect > > spawn $env(SHEL

Re: Need help with expect script

2000-09-05 Thread Lars Nordin
It has been too long since I did expect programming but expect is really an add on to TCL so you can't use bash/shell script type language you have to get the arguments a la TCL. Check out the expect homepage http://expect.nist.gov/ it covers that question (and many others) On Tue, 05 Sep 2000,

Need help with expect script

2000-09-05 Thread Rick Teudt
I am trying to figure out how to pass a command-line argument into an expect script. For example, suppose I have a script called update.exp. The first few lines of update.exp are as follows: #!/usr/bin/expect spawn $env(SHELL) expect "$ " send -- "telnet node$1