Carlos E. R. pecked at the keyboard and wrote:
<snip>
1234@router's password: ->
The ping command is not sent... Ah, got it!
expect "1234@router's password: " send "****\n" expect " ->" send "ping -c 50000 192.168.1.12\n" interact
THANK YOU! :-)))
(I need the router to send pings to my PC, or this computer stops working - - that's another story, there is a bugzilla about it)
If my failing brain is working right you can also nest "expect" statements to send different commands depending on what was sent from the machine you are connecting to. I had to do this with the Cisco routers because the command prompt was different depending on which version of the IOS was installed. This way I only needed one script to cover all of the routers I maintained. -- Ken Schneider SuSe since Version 5.2, June 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org