the following is the auto.tcl content:
# archie
set CINTR \003 ;# ^C
set CSUSP \032 ;# ^Z
set timeout -1
spawn telnet 111.11.1.1
expect_after eof exit ;# archie logs us out if too many people are logged in
expect {
login: {send root\r}
"unknown" {exit 1}
"unreachable" {exit 1}
}
expect {
stty -echo
Password: {send test\r}
stty echo
}
expect {
"/# " {send test.sh msg_id\r}
}
send_user "Hello, World!"
expect {
"pbx$ "
}