Expect - A Power Tool for Systems Administration Automation
Don E. Libes
UNIX system administration often involves programs designed only for interactive use. Many^M 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, one can run interactive programs Shell scripts 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.