5 ms·
Expect is a TCL-based command-line scripting tool. It's designed for scripting things that don't have a scripting interface, and weren't designed to be scripted
by qwertyuiop924 10y ago
Expect is a TCL-based command-line scripting tool. It's designed for scripting things that don't have a scripting interface, and weren't designed to be scripted.
Essentially, expect scripts run a program, send it some input, look for some regexes on stdout, and then send more input, which may change depending on what the regex matches. And so on.
This is useful, say, if you have a package management tool that requires you to explicitly confirm every update. Or if you want to automatically drive a shell on a remote machine over SSH, and you can't use ssh -c for some reason.
You don't need it often. But when you do, it's very useful.