expect: Curing Those Uncontrollable Fits of Interaction.

Don Libes · 1990

UNIX programs used to be designed so that they could be connected with pipes created by a shell. This paradigm is insufficient when dealing with many modern programs that demand to be used interactively. expect is a program designed to control interactive programs. expect reads a script that resembles the dialogue itself but which may include multiple paths through it. Scripts include: . send/expect sequences - expect patterns can include regular expressions. . high-level language - Control flow (if/then/else, while, etc.) allows different actions on different inputs, along with procedure definition, built-in expression evaluation, and execution of arbitrary UNIX programs. . job control - Multiple programs can be controlled at the same time. . user interaction - Control can be passed from scripted to interactive mode and vice versa at any time. The user can also be treated as an I/O source/sink. expect successfully deals with interactive programs. It also solves several ot...

Read the paper · More papers on PaperTik