Reputation: 7504
Is it possible to interact with an already existing terminal using Expect?
Usually a process/terminal is launched via the Expect script, but I want to interact with a terminal that was opened not by the Expect script.
Upvotes: 1
Views: 127
Reputation: 610
Not without using other tools, like "screen", and attaching to the other shell.
An example of this:
$ screen bash
Now you could, from another teminal, attach to the same shell and do stuff, using this:
$ screen -x
So i guess your Expect could do the same, issuing "screen -x" and then doing stuff on the shell.
Upvotes: 2