expect; Scripts for Controlling Interactive Processes

Published: November 01, 1991

Author(s)

Don E. Libes

Abstract

Contemporary shells provide only minimal control (starting, stopping, etc.) over programs, leaving interaction up to users. This means that you cannot run some program non- interactively, such as passwd. Some programs can be run non-interactively, but only with a loss of flexibility, such as fsck. This is where the tool-building philosophy of UNIX begins to break down. expect crosses this line, solving a number of long-standing problems in the UNIX environment.

expect uses Tcl as a language core. In addition, expect can use any UNIX program, whether or not it is interactive. The result is a classic example of a little language synergistically generating large power when combined with the rest of the UNIX workbench.

Previous papers have described the implementation of expect and compared it to other tools. This paper concentrates on the language, primarily by presenting a variety of scripts. Several scripts demonstrate brand-new features of expect.

Citation: Computing Systems, University of California Press, Berkeley, CA
Volume: 4:2
Pub Type: Journals

Download Paper

Keywords

expect, interaction, POSIX, programmed dialogue, shell, Tcl, UNIX
Created November 01, 1991, Updated February 17, 2017