Scripting language to drive other programs.
The man page for "expect" is excellent, but I do recommend the book also.
Two beautiful things about expect are that it can make decisions based on how the driven program responds, and that it can pass control back to you - so, you can, for example, use it to automate the horrid, semi-repetitive part of some task and then turn the reins back to you.
See A Y2K Problem solved with Expect for an example of using Expect.
The only thing I don't like about it is its TCL roots and syntax: tcl is a simply awful language for handling strings, and of course strings are what you mostly deal with in scripting other programs.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-05 Tony Lawrence
A Perl script is "correct" if it gets the job done before your boss fires you. (Larry Wall)
Printer Friendly Version
expect Copyright © December 2003 Tony Lawrence
Have you tried Searching this site?
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.
Contact us
Printer Friendly Version