MSID Highlights MSID Opportunities MSID Partners MSID Products MEL MSID Programs MSID Conferences MSID Search MSID Staff MSID Services MSID Standards MSID Publications NIST MSID MSID MSID
Publications

PLEASE NOTE: The Publications System provided by the Manufacturing Systems Integration Division (MSID) has moved to: http://www.mel.nist.gov/msidlibrary/publications.html. The pages below are maintained for archival purposes only.

Publication summary

Author(s): Don Libes

Publication date: October 1990

Citation: Don Libes: "Using Expect to Automate System Administration Tasks," Proceedings of the Fourth USENIX Large Installation Systems Administration (LISA), October, 1990.

Availability:

  • Postscript
  • A paper copy of this document is available by contacting Kristy Thompson [web,email]
Abstract:
UNIX systems administration often involves programs designed only for interactive use. Many such programs (passwd, su, etc.) cannot be placed into shell scripts. Some programs (fsck, dump, etc) are not specifically interactive, but have poor support for automated use. Expect is a program which can "talk" to interactive programs. A script is used to guide the dialogue. Scripts are written in a high-level language and provide flexibility for arbitrarily complex dialogues. By writing an expect script, can run interactive programs non- interactively. Shell script are incapable of managing these systems administration tasks, but expect scripts can control them and many others. Tasks requiring a person dedicated to interactively responding to badly written programs, can be automated. In a large environment, the time and aggravation saved is immense. Expect is similar in style to the shell, and can easily be mastered by any systems administrator who can program in the shell already. This paper presents real examples of using expect to automate system administration tasks such as passwd and fsck. Also discussed are a number of other systems administration tasks that can be automated.


Attention users of these documents: The information contained in these files should not be altered in any way. Attempts to change these files will adversely impact the integrity of the information and its usefulness. It is intended for use as is and will lose its usefulness if changed.

 

Send questions or comments to Webmaster.