Exercises

  1. In Chapter 19 (p. 435), I described how it took a long time to load the UNIX dictionary into memory using pure Tcl commands. Design and implement an extension to speed that up.

  2. Calculate the time that it took to solve the previous exercise. Divide that by the time difference it takes between loading the dictionary with vanilla Tcl commands and your new extension. How many times will you have to load the dictionary before you earn back the time you spent on the previous exercise?

  3. The Tcl FAQ lists hundreds of extensions to Tcl. Browse through the FAQ and identify extensions that are useful to you. Download, install, and combine them with Expect.

  4. Create your own new extension. If you feel it is of general interest, post a note to the Tcl newsgroup so that others can try it out.

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.