I have bash code that looks like the following:
/usr/bin/expect -c '
spawn python Tools/python/install.py
expect {
-nocase "password:" {
send "$env(PASS)\r"
exp_continue
}
}
interact
'
This code seems to work except for the fact that after it submits the passwords, it hangs. After this block of code, there is more code I want to execute in my script. Is there a way to get expect to drop me back into the bash script to continue execution of lines below this block of code?
(Just to formally answer this question)…
I’m guessing the
interactcommand is biting you. From the man page:I would try either of these:
interactcommand&orscreenBased on your comment, it looks like the former was what worked.