Reputation: 17553
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?
Upvotes: 1
Views: 13192
Reputation: 12571
(Just to formally answer this question)...
I'm guessing the interact
command is biting you. From the man page:
interact gives control of the current process to the user, so that keystrokes are sent to the current process, and the stdout and stderr of the current process are returned.
I would try either of these:
interact
command&
or screen
Based on your comment, it looks like the former was what worked.
Upvotes: 2