I am writing a script using expect in which I have to rlogin to some host & after that I need to send some commands. Now I want to exit to that host and relogin again to som
I found this post after I ran into a race condition problem: sometimes the script completed as expected and other times it didn't. Adding a catch statement to the script ensured the desired outcome every time: