[comp.archives] [tcp-ip] Re: rlogin and run a command etc

libes@cme.nist.gov (Don Libes) (12/05/90)

Archive-name: unix/shell/expect/1990-12-04
Archive: durer.cme.nist.gov:/pub/expect.shar.Z [129.6.32.4]
Original-posting-by: libes@cme.nist.gov (Don Libes)
Original-subject: Re: rlogin and run a command etc
Reposted-by: emv@ox.com (Edward Vielmetti)

In article <1141@cnw01.storesys.coles.oz.au> nigel@cnw01.storesys.coles.oz.au (Nigel Harwood) writes:
>[Neither rsh nor rlogin does what I want - to run a command, possibly
>with cursor addressing, as soon as it has logged in, all non-interactively]

Get 'expect'.  It follows a script to talk to interactive programs
like rlogin, telnet, tip, etc.  The scripting language is quite general.

We use it like crazy here to automate a lot of stupid programs with
interactive-only interfaces.  We've even have scripts that control our
VMS computers from UNIX.  For example, I can set my password on our
UNIX boxes and have it automatically change passwords on our VMS
machines.  It's good for regression testing interactive software, too,
not to mention controlling our network boxes.

expect can be ftp'd as pub/expect.shar.Z from durer.cme.nist.gov.
Request email delivery by mailing to "library@cme.nist.gov".  The
contents of the message should be (no subject line) "send
pub/expect.shar.Z".

Don Libes          libes@cme.nist.gov      ...!uunet!cme-durer!libes