[net.sources] getopt.c and other things

ken@rochester.UUCP (De onbekende kat) (10/03/85)

lumbia.edu login anonymous password rochester

where you should substitute the appropriate values for the hostname,
loginid and password. This will allow ftp to login automatically. Also
this file should have 0600 permission, for obvious reasons.

Have fun.

	Ken

#!/bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #!/bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	ftpget
# This archive created: Thu Oct  3 14:22:51 1985
# By:	De onbekende kat (Het 9de leven)
export PATH; PATH=/bin:$PATH
if test -f 'ftpget'
then
	echo shar: over-writing existing file "'ftpget'"
fi
cat << \SHAR_EOF > 'ftpget'
#! /bin/sh
trap "rm -f /tmp/$$" 0 1 2 3 15
if test $# -lt 2
then
	echo usage: $0 machine directories files...
	exit 1
fi
machine=$1; shift
directory=$1; shift
tmpfile=/tmp/ftp$$
cp /dev/null $tmpfile
if test $directory
then
	echo "cd $directory" >> $tmpfile
fi
for i
do
	echo get $i >> $tmpfile
done
echo quit >> $tmpfile
echo quit >> $tmpfile
ftp $machine < $tmpfile
rm -f $tmpfile
exit 0
SHAR_EOF
chmod +x 'ftpget'
#	End of shell archive
exit 0
-- 
UUCP: ..!{allegra,decvax,seismo}!rochester!ken ARPA: ken@rochester.arpa
USnail:	Dept. of Comp. Sci., U. of Rochester, NY 14627. Voice: Ken!