Posted to tcl by sbron at Tue Feb 19 13:38:29 GMT 2013view raw
- expect {
- "assword:" {
- send $UPASS\r
- exp_continue
- }
- " $UNAME:" {
- puts "got ' $UNAME:'"
- send "$UPASS\r"
- }
- timeout {
- puts "got timeout"
- exit 2
- }
- }
- puts "logged in"
- set timeout -1
- expect {
- eof {
- puts "ssh has exited"
- }
- }
- puts "expect block finished"