Banner

Using the ‘expect’ Command To Automate Interaction With Programs

From the expect man page:
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.

At the institution for which I work, I am responsible for our Sungard HE Banner ERP system. One of the development tasks that I was presented with was to automatically run a binary file at 10pm every night. The challenge was that this program was interactive and required the user to input answers to prompts. This sounded like a perfect use of the Unix program expect.

Syndicate content
v2.0