2

Example would help:

#!/usr/bin/expect

spawn $env(SHELL)
expect "\$ "
interact KILL return
send "exit\r"
expect eof

So in the above, when it gives control to me via interact, I can issue any command I want. But if I start to type "KILL", it seems expect takes over STDOUT, so I can't see what I'm typing. It works as expected, otherwise.

But I'd like to also be able to see what I'm typing, when I'm typing "KILL"

Am I missing something simple from the manual? Thanks!

Kevin
  • 1,489
  • 2
  • 20
  • 30

1 Answers1

1
#!/usr/bin/expect

spawn $env(SHELL)
expect "\$ "
interact -nobuffer KILL return
send "exit\r"
expect eof

interact -nobuffer

That seems to do it. :)

Kevin
  • 1,489
  • 2
  • 20
  • 30