Let\'s say I am trying to write an expect script for a test.sh that has three prompts: prompt1, prompt2, prompt3.
My code is like this:
You can expect multiple things:
expect { "prompt2" { send "pass2" expect "prompt3" send "pass3" } "prompt3" { send "pass3" } }