Exercises

  1. Use the timeout technique from the tknewsbiff script to cause an interact to return by pressing a Tk button. Compare this to using a signal.

  2. The file transfer script from page 461 assumes very little of the remote host. Modify the script so that it checks for the existence of rz/sz (or other tools) on the remote machine and uses them if possible. Similarly, use gzip if possible.

  3. Most compression programs can read from or write to a pipeline. Use this to reduce the number of temporary files used by the file transfer script.

Get Exploring Expect now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.