Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: Running 'ftp' from a program using 'popen'? (long) Message-ID: <23769:Oct1019:43:1990@kramden.acf.nyu.edu> Date: 10 Oct 90 19:43:19 GMT References: <205@melpar.UUCP> Distribution: usa Organization: IR Lines: 23 In article <205@melpar.UUCP> toppin@melpar.UUCP (Doug Toppin) writes: > I am using 'popen()' to run 'ftp' and am then writing the appropriate > command to the file pointer returned by 'popen()'. Deja vu. Don Libes' expect program should be able to handle all the automation you need. expect is described in the paper "expect: Curing Those Uncontrollable Fits of Interaction" by Don Libes, Proceedings of the Summer 1990 USENIX Conference, Anaheim, CA, June 11-15, 1990. More examples and discussion, specifically designed for system administrators, are in "Using expect to Automate System Administration Tasks" by Don Libes, Proceedings of the 1990 USENIX Large Systems Administration Conference (LISA) IV, Colorado Springs, CO, October 17-19, 1990. expect may be ftp'd as pub/expect.shar.Z from durer.cme.nist.gov. If you cannot ftp, you may request email copies by mailing to "library@ cme.nist.gov". The contents of the message should be (no subject line) "send pub/expect.shar.Z". Once you have retrieved the system, please read the INSTALL file. The paper(s) mentioned above can be ftp'd separately as pub/expect.ps.Z and pub/expect-sysadm.ps.Z. ---Dan