Consider the following expect script:
#!/usr/bin/expect
spawn bash
interact {
-o
hello_world { send "Goodbye" }
}
Under this script, any time the process sends hello_world, the hello_world
disappears and turns into Goodbye
.
I could explicitly write send_user("hello_world")
to bring it back, but I am wondering if there is an option such as -echo
for user input that would tell expect to show the process output anyways.