Obtaining Expect and the Examples
Expect may already be installed on your system, typically in /usr/local/bin. If you cannot find Expect, ask your system administrator. If you do not have a system administrator, you can obtain Expect by following the instructions below. Expect requires no special permissions to install, nor does it have to be installed in any particular place. You can even try it out in your own directory.
Expect includes a number of examples, several of which are useful as tools in their own right. Indeed, quite a few have man pages of their own and can be installed along with Expect. If the examples are not installed, you can find them in the example directory of the Expect distribution. Ask your local system administrator where the distribution is.
The examples provided with Expect are subject to change, but below is a list of just a few of the examples. The README file in the example directory contains a complete list as well as full explanations about each of the examples:
Example 1-1.
| play one |
| allow disconnection from and reconnection to background processes |
| emulate a Dvorak keyboard |
| retrieve an RFC from the Internet via anonymous |
| let several people control a program at the same time for remote assistance, group editing, etc. |
| unhang a printer waiting for a lock |
| generate a good random password and optionally run |
| set a password on many machines simultaneously |
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access