🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1480

Re: standard input to commands in a shell script

#1480
From: Michael Meissner
Date: Fri, 12 Oct 1990 19:28
37 lines
1752 bytes
In article <BARNETT.90Oct12133123@grymoire.crd.ge.com>
barnett@grymoire.crd.ge.com (Bruce Barnett) writes:

| >   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

(echo "user anonymous"; echo "${USER-${LOGNAME}}@`hostname`"; echo dir; echo quit) | \
	ftp uunet.uu.net
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Do apple growers tell their kids money doesn't grow on bushes?
Technical Details
Message-ID: <MEISSNER.90Oct12152854@osf.osf.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker!paperboy!meissner
References: <1990Oct12.025833.13376@cubmol.bio.columbia.edu> <7219@muffin.cme.nist.gov> <BARNETT.90Oct12133123@grymoire.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker!paperboy!meissner
From: meissner@osf.org (Michael Meissner)
Newsgroups: comp.unix.shell
Subject: Re: standard input to commands in a shell script
Message-ID: <MEISSNER.90Oct12152854@osf.osf.org>
Date: 12 Oct 90 19:28:54 GMT
References: <1990Oct12.025833.13376@cubmol.bio.columbia.edu>
 <7219@muffin.cme.nist.gov> <BARNETT.90Oct12133123@grymoire.crd.ge.com>
Sender: news@OSF.ORG
Organization: Open Software Foundation
Lines: 37
In-reply-to: barnett@grymoire.crd.ge.com's message of 12 Oct 90 17:31:23 GMT