I have the following script to execute a command on a remote device on ssh:
#! / Usr / bin / expect -f set cmd $ argv set timeout-1 spawning ssp-p22 user @ 1 9 82.1.1 match_max 100000 "* * Expected to announce: *" Send "PASS" Expected "& lt; * "Send $ CMD \ r is expected" *: "On the previous line," Y \ R "can be expected
To exit my script" File " End "though the remote device never sends" end of file ", even if the communication is over. Is there any possibility of exit from some type of inactivity timer? Something like this:
expected feof for 10 seconds
Set the timeout
variable
eof
not feof
Use
Comments
Post a Comment