From: kko@fraser.sfu.ca (Samuel Ko)
Subject: A Unix Shell Script to Auto-Ftp MSDOS Files from Simtel's mirrors ...
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Wed, 14 Oct 1992 04:25:26 GMT

After posting my "How to do anonymous ftp?", I've got many requests from
readers of this newsgroup for that auto-ftp shell script ... So why not
post it? ...

The following is a Unix shell script that can help you auto-download
files from the /pub/msdos directory at oak.oakland.edu ...

To use it ...
1) save this article as oakftp (or whatever name you prefer) ...
2) cut everything above #!/bin/sh ...
3) make this file executable ... i.e. chmod u+x oakftp
4) run the script ... oakftp directoryA file1 file2 directoryB file3 file4 ... 

If your favorite simtel mirror site is not oak.oakland.edu, you can 
substitute the first two lines after the comment box with the host you 
prefer and the corresponding directory ... i.e.  

host=                         directory=
wuarchive.wustl.edu           mirror/msdos/$1
ftp.uu.net                    systems/simtel20/msdos/$1
nic.funet.fi                  pub/msdos/Simtel20-mirror/$1
src.doc.ic.ac.uk              pub/ibmpc/simtel20/$1
nic.switch.ch                 mirror/msdos/$1
archie.au                     micros/pc/simtel-20/$1
nctuccca.edu.tw               SIMTEL20/msdos/$1

Hope you like this ... And any comments, suggestions, and flames will
be much appreciated ...

--
Samuel Ko (kko@sfu.ca) (aka: The Smart One)

--------------------------- Cut Here ------------------------------------
#!/bin/sh
#######################################################################
#                                                                     #
#     oakftp ...                                                      #
#     Shell script to auto-ftp files from the pub/msdos               #
#     directory at OAK.oakland.edu                                    #
#     Written by Alvin Khoo (khoo@fraser.sfu.ca) based on Jon         #
#     Granrose's getfile ...                                          #
#     Modified and updated by Samuel Ko (kko@sfu.ca) ... 92/10/07 ... # 
#                                                                     #
#######################################################################

host=oak.oakland.edu
directory=pub/msdos/$1


if [ $# -lt 2 ]
then
	echo "Usage: $0 directoryA file1 file2 ... directoryB file3 file4 ..."
	echo "Example: $0 trojan-pro scanv95b.zip arc-lbr shez80.zip"
	exit 1
else

(
	echo user anonymous -$USER@$host
	echo hash
	echo binary
	echo cd $directory
while test -n "$1"
do
   case $1 in
	4dos) 		echo cd .. ; echo cd 4dos;;
	abc) 		echo cd .. ; echo cd abc;;
	ada) 		echo cd .. ; echo cd ada;;
	ai)             echo cd .. ; echo cd ai;;
        aijournal) 	echo cd .. ; echo cd aijournal;;
	allcharge) 	echo cd .. ; echo cd allcharge;;
	apl) 		echo cd .. ; echo cd apl;;
	arc?lbr) 	echo cd .. ; echo cd arc-lbr;;
	asm?mag) 	echo cd .. ; echo cd asm-mag;;
        asmutl) 	echo cd .. ; echo cd asmutl;;
        astronomy)      echo cd .. ; echo cd astronomy;;
	at) 		echo cd .. ; echo cd at;;
	autocad) 	echo cd .. ; echo cd autocad;;
	awk) 		echo cd .. ; echo cd awk;;
	basic) 		echo cd .. ; echo cd basic;;
	batutl) 	echo cd .. ; echo cd batutl;;
	bbs) 		echo cd .. ; echo cd bbs;;
	bbsdoors) 	echo cd .. ; echo cd bbsdoors;;
	bbslists) 	echo cd .. ; echo cd bbslists;;
	bible) 		echo cd .. ; echo cd bible;;
	biology)        echo cd .. ; echo cd biology;;
        books) 		echo cd .. ; echo cd books;;
	borland) 	echo cd .. ; echo cd borland;;
	c) 		echo cd .. ; echo cd c;;
	cad) 		echo cd .. ; echo cd cad;;
	calculator) 	echo cd .. ; echo cd calculator;;
	Case)           echo cd .. ; echo cd case;;
        catalog) 	echo cd .. ; echo cd catalog;;
	cdrom)          echo cd .. ; echo cd cdrom;;
        chemistry)      echo cd .. ; echo cd chemistry;;
        cis) 		echo cd .. ; echo cd cis;;
	citadel) 	echo cd .. ; echo cd citadel;;
	clipper) 	echo cd .. ; echo cd clipper;;
	cmplngmag) 	echo cd .. ; echo cd cmplngmag;;
	cmu?pcip) 	echo cd .. ; echo cd cmu-pcip;;
	cobol) 		echo cd .. ; echo cd cobol;;
	compatibles) 	echo cd .. ; echo cd compatibles;;
	compress) 	echo cd .. ; echo cd compress;;
	compute?pc) 	echo cd .. ; echo cd compute-pc;;
	cplusplus) 	echo cd .. ; echo cd cplusplus;;
	crossasm) 	echo cd .. ; echo cd crossasm;;
	crossref) 	echo cd .. ; echo cd crossref;;
	database) 	echo cd .. ; echo cd database;;
	dbase) 		echo cd .. ; echo cd dbase;;
        dbms?mag)       echo cd .. ; echo cd dbms-mag;;
	ddjmag) 	echo cd .. ; echo cd ddjmag;;
        demacs)         echo cd .. ; echo cd demacs;;
	deskaccess) 	echo cd .. ; echo cd deskaccess;;
	deskjet) 	echo cd .. ; echo cd deskjet;;
	deskpub) 	echo cd .. ; echo cd deskpub;;
	desqview) 	echo cd .. ; echo cd desqview;;
	dirutl) 	echo cd .. ; echo cd dirutl;;
	disasm) 	echo cd .. ; echo cd disasm;;
	djgpp)          echo cd .. ; echo cd djgpp;;
        dskutl) 	echo cd .. ; echo cd dskutl;;
        dv?x)           echo cd .. ; echo cd dv-x;;
	editor) 	echo cd .. ; echo cd editor;;
	education) 	echo cd .. ; echo cd education;;
	eel) 		echo cd .. ; echo cd eel;;
	ega) 		echo cd .. ; echo cd ega;;
	electrical)     echo cd .. ; echo cd electrical;;
        emulators) 	echo cd .. ; echo cd emulators;;
	fido) 		echo cd .. ; echo cd fido;;
	filedocs) 	echo cd .. ; echo cd filedocs;;
	filutl) 	echo cd .. ; echo cd filutl;;
	finance) 	echo cd .. ; echo cd finance;;
	flowchart) 	echo cd .. ; echo cd flowchart;;
	formgen) 	echo cd .. ; echo cd formgen;;
	forth) 		echo cd .. ; echo cd forth;;
	fortran) 	echo cd .. ; echo cd fortran;;
	fossil) 	echo cd .. ; echo cd fossil;;
	freemacs) 	echo cd .. ; echo cd freemacs;;
	genealogy) 	echo cd .. ; echo cd genealogy;;
        genie)          echo cd .. ; echo cd genie;;
        geography)      echo cd .. ; echo cd geography;;
        geoworks)       echo cd .. ; echo cd geoworks;;
	gif) 		echo cd .. ; echo cd gif;;
        gifnews)        echo cd .. ; echo cd gifnews;;
	gnuish) 	echo cd .. ; echo cd gnuish;;
	graph) 		echo cd .. ; echo cd graph;;
	graphics) 	echo cd .. ; echo cd graphics;;
	hamradio) 	echo cd .. ; echo cd hamradio;;
	handicap) 	echo cd .. ; echo cd handicap;;
        hebrew)         echo cd .. ; echo cd hebrew;;
	hypertext) 	echo cd .. ; echo cd hypertext;;
        iconlang)       echo cd .. ; echo cd iconlang;;
	info) 		echo cd .. ; echo cd info;;
	inside?tp) 	echo cd .. ; echo cd inside-tp;;
	irit) 		echo cd .. ; echo cd irit;;
	ka9q?tcpip) 	echo cd .. ; echo cd ka9q-tcpip;;
	kermit) 	echo cd .. ; echo cd kermit;;
	keyboard) 	echo cd .. ; echo cd keyboard;;
	lan) 		echo cd .. ; echo cd lan;;
        langtutor)      echo cd .. ; echo cd langtutor;;
	lantimes) 	echo cd .. ; echo cd lantimes;;
	laptop) 	echo cd .. ; echo cd laptop;;
	laser) 		echo cd .. ; echo cd laser;;
	legal) 		echo cd .. ; echo cd legal;;
	linguistics) 	echo cd .. ; echo cd linguistics;;
	lisp) 		echo cd .. ; echo cd lisp;;
        literature)     echo cd .. ; echo cd literature;;
	logo) 		echo cd .. ; echo cd logo;;
	lotus123) 	echo cd .. ; echo cd lotus123;;
	mac) 		echo cd .. ; echo cd mac;;
	mapping) 	echo cd .. ; echo cd mapping;;
	math) 		echo cd .. ; echo cd math;;
	max) 		echo cd .. ; echo cd max;;
	menu) 		echo cd .. ; echo cd menu;;
	microcorn) 	echo cd .. ; echo cd microcorn;;
	microsoft) 	echo cd .. ; echo cd microsoft;;
	modem) 		echo cd .. ; echo cd modem;;
	modula2) 	echo cd .. ; echo cd modula2;;
        mormon)         echo cd .. ; echo cd mormon;;
	mouse) 		echo cd .. ; echo cd mouse;;
	msjournal) 	echo cd .. ; echo cd msjournal;;
	mswindows) 	echo cd .. ; echo cd mswindows;;
	music) 		echo cd .. ; echo cd music;;
	ncsatelnet) 	echo cd .. ; echo cd ncsatelnet;;
	network) 	echo cd .. ; echo cd network;;
	neural?nets) 	echo cd .. ; echo cd neural-nets;;
        notabene)       echo cd .. ; echo cd notabene;;
	opus) 		echo cd .. ; echo cd opus;;
	packet) 	echo cd .. ; echo cd packet;;
	pascal) 	echo cd .. ; echo cd pascal;;
	pc?jr) 		echo cd .. ; echo cd pc-jr;;
	pcmag) 		echo cd .. ; echo cd pcmag;;
	pcpursuit) 	echo cd .. ; echo cd pcpursuit;;
	pcresource) 	echo cd .. ; echo cd pcresource;;
	pctech) 	echo cd .. ; echo cd pctech;;
	pctechniques) 	echo cd .. ; echo cd pctechniques;;
	perl) 		echo cd .. ; echo cd perl;;
	pgmutl) 	echo cd .. ; echo cd pgmutl;;
	pibterm) 	echo cd .. ; echo cd pibterm;;
	pilot) 		echo cd .. ; echo cd pilot;;
        pktvrdr)        echo cd .. ; echo cd pktdrvr;;
	pli) 		echo cd .. ; echo cd pli;;
	plot) 		echo cd .. ; echo cd plot;;
	postscript) 	echo cd .. ; echo cd postscript;;
	preprocess) 	echo cd .. ; echo cd preprocess;;
	printer) 	echo cd .. ; echo cd printer;;
	procomm) 	echo cd .. ; echo cd procomm;;
	prodigy) 	echo cd .. ; echo cd prodigy;;
	progjourn) 	echo cd .. ; echo cd progjourn;;
	prolog) 	echo cd .. ; echo cd prolog;;
	qbasic) 	echo cd .. ; echo cd qbasic;;
	qedit) 		echo cd .. ; echo cd qedit;;
        qemm)           echo cd .. ; echo cd qemm;;
	qmodem) 	echo cd .. ; echo cd qmodem;;
	qpascal) 	echo cd .. ; echo cd qpascal;;
        qtrdeck)        echo cd .. ; echo cd qtrdeck;;
	ramdisk) 	echo cd .. ; echo cd ramdisk;;
	rbbs?pc) 	echo cd .. ; echo cd rbbs-pc;;
	screen) 	echo cd .. ; echo cd screen;;
        simulation)     echo cd .. ; echo cd stimulation;;
	small?c) 	echo cd .. ; echo cd small-c;;
	smalltalk) 	echo cd .. ; echo cd smalltalk;;
	snobol4) 	echo cd .. ; echo cd snobol4;;
	sound) 		echo cd .. ; echo cd sound;;
	spreadsheet) 	echo cd .. ; echo cd spreadsheet;;
	sprint) 	echo cd .. ; echo cd sprint;;
	starlink) 	echo cd .. ; echo cd starlink;;
	starter) 	echo cd .. ; echo cd starter;;
	statistics) 	echo cd .. ; echo cd statistics;;
        stunnpc)        echo cd .. ; echo cd stunnpc;;
	surfmodl) 	echo cd .. ; echo cd surfmodl;;
	swap) 		echo cd .. ; echo cd swap;;
	sysutl) 	echo cd .. ; echo cd sysutl;;
        tagbbs)         echo cd .. ; echo cd tagbbs;;
	taxes) 		echo cd .. ; echo cd taxes;;
        teaching)       echo cd .. ; echo cd teaching;;
	telegard) 	echo cd .. ; echo cd telegard;;
	telix) 		echo cd .. ; echo cd telix;;
	tex) 		echo cd .. ; echo cd tex;;
	tiff) 		echo cd .. ; echo cd tiff;;
	trojan?pro) 	echo cd .. ; echo cd trojan-pro;;
	turbo?c) 	echo cd .. ; echo cd turbo-c;;
	turbobas) 	echo cd .. ; echo cd turbobas;;
	turbopas) 	echo cd .. ; echo cd turbopas;;
        turbovis)       echo cd .. ; echo cd turbovis;;
	txtutl) 	echo cd .. ; echo cd txtutl;;
        ubasic)         echo cd .. ; echo cd ubasic;;
	uemacs) 	echo cd .. ; echo cd uemacs;;
	uucp) 		echo cd .. ; echo cd uucp;;
	ventura) 	echo cd .. ; echo cd ventura;;
	vga) 		echo cd .. ; echo cd vga;;
        visbasic)       echo cd .. ; echo cd visbasic;;
	voice) 		echo cd .. ; echo cd voice;;
	voicemail) 	echo cd .. ; echo cd voicemail;;
	waffle) 	echo cd .. ; echo cd waffle;;
	weather)        echo cd .. ; echo cd weather;;
        windows3) 	echo cd .. ; echo cd windows3;;
	wordperf) 	echo cd .. ; echo cd wordperf;;
	worldmap) 	echo cd .. ; echo cd worldmap;;
	x?10) 		echo cd .. ; echo cd x-10;;
	xlisp) 		echo cd .. ; echo cd xlisp;;
	zip) 		echo cd .. ; echo cd zip;;
	zmodem) 	echo cd .. ; echo cd zmodem;;
	zoo) 		echo cd .. ; echo cd zoo;;
	*.*)		echo get $1;;
      esac
echo pwd
shift
done
	echo bye

) | ftp -n -v $host 

fi