8.5. Expect-5.45.4

The Expect package contains tools for automating, via scripted dialogues, interactive applications such as telnet, ftp, passwd, fsck, rlogin, and tip. Expect is also useful for testing these same applications as well as easing all sorts of tasks that are prohibitively difficult with anything else. The DejaGnu framework is written in Expect.

Approximate build time: 0.2 SBU
Required disk space: 3.9 MB

8.5.1. Installation of Expect

Prepare Expect for compilation:

./configure --prefix=/usr           \
            --with-tcl=/usr/lib     \
            --enable-shared         \
            --mandir=/usr/share/man \

The meaning of the configure options:


This parameter is needed to tell configure where the tclConfig.sh script is located.


This explicitly tells Expect where to find Tcl's internal headers.

Build the package:


To test the results, issue:

make test

Install the package:

make install
ln -svf expect5.45.4/libexpect5.45.4.so /usr/lib

8.5.2. Contents of Expect

Installed program: expect
Installed library: libexpect-5.45.so

Short Descriptions


Communicates with other interactive programs according to a script


Contains functions that allow Expect to be used as a Tcl extension or to be used directly from C or C++ (without Tcl)