Andreas Schwab <sch...@linux-m68k.org> writes: > Please define "outside the bash script".
If I run this, it works: #!/usr/bin/expect set passwd [lindex $argv 1] set password passwd spawn /usr/bin/ssh [lindex $argv 0]@[lindex $argv 2] expect { -re ".*Are.*.*yes.*no.*" { send "yes\n" exp_continue #look for the password prompt } "*?assword:*" { send $passwd send "\n" interact #The expect command will now return } } > Since you are passing the expect script on stdin the interact command > will immediately read EOF, and expect will run into its implicit > timeout. Hmm, I see, so how am I supposed to run it?;) -- Esben Stien is b0ef@e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n