My script pauses when completing. I have done several google searches but I don't see anything which would indicate this is trivial or easy to fix. Do I need a newer/older version of expect? My current version is 5.43.0.
The error message causing the one second pause is ``write() failed to write anything - will sleep(1) and retry...''. The thing it is trying to do is ``tty_set: raw = 0, echo = 1''.
My script is pasted below except the password and IP address. Instead of the real IP I used a fake 126.96.36.199. I also used a fake password of 12345.
If you run the script with ``expect -d myscript.exp'' then you can see the messaage when you logout of the remote server. ``-d'' turns on debugging.
Please let me know if I can clarify my question any better. Thanks in advance.
set timeout -1
spawn ssh -p 22 -l root 188.8.131.52
expect -re "assword"
send -- "12345\r"