Skip to content. | Skip to navigation

Navigation

You are here: Home / Support / Guides / Scripting / Expect / Interact / What's happening

Personal tools

Interact

Expect's interact command

What's happening

Basic interact
 
Basic interact
The basic operations of interact

When you invoke interact there's two implied spawn_id's and four I/O actions being applied. With nothing else said, the expect process will read from $user_spawn_id and pass that onto $spawn_id and then read from $spawn_id and pass the data onto $user_spawn_id. Just like you'd expect!

In the diagram there are some extra labels which we'll discuss next.

That's useful but not very exciting. What is a bit more interesting is Don Libes' kibitz script which has two users sharing a shell, ie. both users can type input and both users see the output. That sounds a bit more fun.

However, re-implementing it is not so straightforward.

Document Actions