Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An question about using expect under NT

0 views
Skip to first unread message

8623508

unread,
Mar 2, 2001, 9:35:53 PM3/2/01
to

I use expect under NT and I want to
use command, like "expect auto.tcl msg_id". msg_id is a parameter
want to be used in auto.tcl and it is a variable number.
Hence, we want to send msg_id into auto.tcl then execute expect auto.tcl.
I know it is easy to be done in Unix platform using shell script;
however, I don't know how to do in NT platform.

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$ "
}

0 new messages