Hi ,
I'm using expect to script automatic telnet sessions from a linux to an HP
11.00 box. My script has the usual sort of statements such as:
expect {
timeout {sorry "Timed out"}
*Password:*
}
Okay - so this is all going okay.
I spawn telnet and send an open $host command - this works fine. Then I send
the UserID and the above code-snip comes into play. What puzzles me is that
(when I use the -d flag)
I can see that the response is " " and expect never matches this so in the
end it timesout. What is happening? What is the" " generated by and how
should I stop
it from interfering with the expect script...?
Thanks
|
|
0
|
|
|
|
Reply
|
Jon
|
6/1/2004 9:19:18 PM |
|
On 2004-06-01, Jon <snakes_boi@yahoo.co.uk> wrote:
: I'm using expect to script automatic telnet sessions from a linux to an HP
: 11.00 box. My script has the usual sort of statements such as:
:
: expect {
: timeout {sorry "Timed out"}
: *Password:*
: }
:
: Okay - so this is all going okay.
: I spawn telnet and send an open $host command - this works fine. Then I send
: the UserID and the above code-snip comes into play. What puzzles me is ...
:
You might want to use kermit instead; it was specifically designed to
automate Telnet connections (among other things). It's already installed
on your HP-UX system. For a tutorial see:
http://www.columbia.edu/kermit/ckututor.html
For a scripting tutorial and examples see:
http://www.columbia.edu/kermit/ckscripts.html
For a sample Telnet script, see:
ftp://kermit.columbia.edu/kermit/scripts/ckermit/autotelnet
Ditto, by the way, for FTP:
http://www.columbia.edu/kermit/ftpclient.html
http://www.columbia.edu/kermit/ftpscripts.html
- Frank
|
|
0
|
|
|
|
Reply
|
Frank
|
6/3/2004 1:41:22 PM
|
|