Exercises

  1. Write an ftp mirror script—which copies a file hierarchy from one anonymous ftp site to another. Do it using a single spawn id. Do it again, but use two spawned ftp processes—one to retrieve the listings and one to do the I/O. What are the advantages and disadvantages of these two approaches.

  2. Extend one of the scripts from the previous exercise to update multiple ftp sites simultaneously.

  3. Write a script that watches a user interacting with a process and produces a new Expect script that automates the session.

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.