Expect

term

networking

The Tcl extension, written by Don Libes in 1990, that automates programs which only offer an interactive terminal.

It exists because a great deal of infrastructure has no interface except the one built for a human typing at a prompt. Expect drives that interface: wait for this text, send that text, handle the case where neither arrives. Every network automation effort before vendors shipped usable programmatic interfaces was some version of it, and a surprising amount of production tooling still is. The honest assessment is that screen-scraping a command line is fragile and was always the wrong shape, and that it was also the only thing available for two decades, which is why the skill outlived every prediction of its retirement.

Also known as: don libes, spawn expect send

All glossary entries