From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id IAA10054 for ; Tue, 26 Nov 1996 08:37:49 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id QAA00041; Mon, 25 Nov 1996 16:21:40 -0500 (EST) Resent-Date: Mon, 25 Nov 1996 16:01:45 -0500 (EST) Message-Id: <199611252101.QAA01879@redwood.skiles.gatech.edu> X-Mailer: exmh version 1.6.9 8/22/96 To: zsh-users@math.gatech.edu Subject: Re: Suggestions for auto-login script for ZSH? In-reply-to: Your message of "Mon, 25 Nov 1996 09:08:33 -1000." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Mon, 25 Nov 1996 16:01:39 -0500 From: Richard Coleman Resent-Message-ID: <"hr-eC3.0.AD7.uaWco"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/529 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > I'm trying to write a script that would allow be to make telnet login (= or > ftp login) processes automated. Here's what I tried: > = > #!/home/u1/mariah/bin/zsh > telnet host.com > echo 'loginname' > echo 'password' > = > 1. ftp > 2. login > 3. password > 4. get a particular file > 5. exit :) The problem is that the login process reads the tty directly, when getting the password. No amount of shell redirection can get around this. The best solution is to retrieve the program "expect" which is a tcl extension. It allow you to automate many things which are generally interactive, such as rlogin/telnet, changing passwords, ftping, etc... It is easy to build I would also recommend Don Libe's book "Exploring Expect" from O'Reilly. It is an excellent book. Check out the expect home page at: http://elib.cme.nist.gov:80/pub/expect/ rc