blank.gif (43 bytes)

Church Of The
Swimming Elephant

Index | Description | Usage | Options | Variables | Hints | Bulletproof

Expect Description

Expect is a program that “talks” to other interactive programs according to a script.  Following the script, Expect knows what can be expected from a program and what the correct response should be.  An interpreted language provides branching and high-level control structures to direct the dialogue.  In addition, the user can take control and interact directly when desired, afterward returning control to the script.  Expect is based on TCL.

Expectk is a mixture of Expect and Tk.  It behaves just like Expect and Tk’s wish.  Expect can also be used directly in C or C++ (that is, without Tcl).  See libexpect(3).

The name “Expect” comes from the idea of send/expect sequences popularized by uucp, kermit and other modem control programs.  However unlike uucp, Expect is generalized so that it can be run as a user-level command with any program and task in mind.  Expect can actually talk to several programs at the same time.

In general, Expect is useful for running any program which requires interaction between the program and the user.  All that is necessary is that the interaction can be characterized programmatically.  Expect can also give the user back control (without halting the program being controlled) if desired.  Similarly, the user can return control to the script at any time.

This material is excerpted from the O'Reilly book "Exploring Expect" by Don Libes, and can also be found in the manpage on many UNIX platforms. 


Protect yourself from cyberstalkers, identity thieves, and those who would snoop on you.
Stop spam from invading your inbox without losing the mail you want. We give you more control over your e-mail than any other service.
Block popups, ads, and malicious scripts while you surf the net through our anonymous proxies.
Participate in Usenet, host your web files, easily send anonymous messages, and more, much more.
All private, all encrypted, all secure, all in an easy to use service, and all for only $5.95 a month!

Service Details

Have you gone to church today?
All pages ©1999, 2000, 2001, 2002, 2003 Church of the Swimming Elephant unless otherwise stated
Church of the Swimming Elephant©1999, 2000, 2001, 2002, 2003 is a wholly owned subsidiary of Packetderm, LLC.

Packetderm, LLC
210 Park Ave #308
Worcester, MA 01609