expect script + expect miss the send string + delay issue

view full story

http://serverfault.com – I write the active.ksh script (based on expect) in order to login automatically to some Solaris machine and execute the hostname command (login to virtual IP in order to verify which hostname is the active machine - I have two cluster solaris machines ) The problem is with expect; expect sends the password string (pass123) and it misses the Password question, and it still waits for the password. So actually the password (pass123) was entered after password question. On most cases the expect script works fine but sometimes it missed the password. EXAMPLE OF THE PROBLEM ./active.ksh spawn (HowTos)