Hi,

10May2005 @ 12:30 [EMAIL PROTECTED] thusly spake
> I have the following 'Expect' script:
> 
> ~_________ doPass ________________________ 
> /
> #!/usr/bin/expect -f
> set username [lindex $argv 0]
> set password [lindex $argv 1]
> 
> spawn passwd $username
> expect "New password: " 
sleep 2
> send "$password\r"
> expect "Retype new password: "
sleep 2
> send "$password\r"
> send "exit\r"
> expect eof
> \_________________________________________
> 
> This works fine the first time, then times out when running consecutive times.
> Does anyone know what is happening and why it times out if I run it twice or 3
> times in a row?

Thanks for your help. As usual I found out what it was soon after I posted.
See the additions to the above script. It becomes obvious when you think about
it.

kr,
Luke


-- 
............._..
.|  .| |.|/.|_ .
.|__.|_|.|\.|_ .
:61 421 276 282:
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to