🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1479

Re: standard input to commands in a shell script

#1479
From: Bruce Barnett
Date: Fri, 12 Oct 1990 17:31
28 lines
1323 bytes
>   In article <1990Oct12.025833.13376@cubmol.bio.columbia.edu> ping@cubmol.bio.columbia.edu (Shiping Zhang) writes:

>>ftp genbank.bio.net << END
>>ftp
>>ident
>>ls
>>quit
>>END

In article <7219@muffin.cme.nist.gov> libes@cme.nist.gov (Don Libes) writes:

>The problem is that ftp (as do most programs) reads passwords from
>/dev/tty, ignoring your i/o redirection.  There is no shell mechanism
>to get around this. 

News to me. I have always done this, which works fine.

set HOST=`hostname`
set SOURCE=machine.edu
set temp=/tmp/file
ftp -n $SOURCE <<END
user anonymous $HOST
get pub/file $temp
quit
END
--
Bruce G. Barnett	barnett@crd.ge.com	uunet!crdgw1!barnett
Technical Details
Message-ID: <BARNETT.90Oct12133123@grymoire.crd.ge.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!crdgw1!barnett
References: <1990Oct12.025833.13376@cubmol.bio.columbia.edu> <7219@muffin.cme.nist.gov>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!rpi!crdgw1!barnett
From: barnett@grymoire.crd.ge.com (Bruce Barnett)
Newsgroups: comp.unix.shell
Subject: Re: standard input to commands in a shell script
Message-ID: <BARNETT.90Oct12133123@grymoire.crd.ge.com>
Date: 12 Oct 90 17:31:23 GMT
References: <1990Oct12.025833.13376@cubmol.bio.columbia.edu>
 <7219@muffin.cme.nist.gov>
Sender: news@crdgw1.crd.ge.com
Reply-To: barnett@crdgw1.ge.com
Organization: GE Corp. R & D, Schenectady, NY
Lines: 28
In-reply-to: libes@cme.nist.gov's message of 12 Oct 90 16:37:37 GMT