Date : Fri, 27 Jan 1984 10:24:44 EST
From : "Ferd Brundick (LTTB)" <fsbrn@brl-voc>
Subject: Re: multiple FTP gets from SIMTEL20 for CPM stuff..
Haaah,
Our local implementation of ftp doesn't have the 'script' or 'xfile'
commands, so we have to use re-directed input. I grabbed all the
cpmug catalog files (1 per directory) by building a file containing
the following commands:
verbose
tenex
get "micro:<cpmug.vol001>catalog" catalog.001
get "micro:<cpmug.vol002>catalog" catalog.002
... (more of the same)
bye
I actually built this file with a shell script that used the 'while' construct:
i=1
while test $i -lt 10
do
echo "get \"micro:<cpmug.vol00$i>catalog\" catalog.00$i" >>ftp.commands
i=`expr $i + 1`
done
(The sequence \" protects the double-quote)
Once you have built the ftp command file, you enter the following command:
ftp simtel20 <ftp.commands
If you are transferring a large number of files, you may want to run the job
in the background by putting a '&' after the command line:
ftp simtel20 <ftp.commands &
If the files require post-processing to remove the ITS header or convert CR/LF
to LF (for UN*X compatibility) put the ftp line in a second shell script:
ftp simtel20 <ftp.commands
for i in list_of_files
do
behead $i temp
del.cr temp $i.fixed
done
While this method requires a lot of work initially, it is much easier than
manually typing lots of 'get' commands. The super-ftp file transfer program
that Dave Towson mentioned will (someday) be an interactive C version of the
method outlined above (but not this weekend -- I'm patching WordStar).
If you have any questions, problems, or suggestions, feel free to write to
me: <fsbrn@brl-voc>
By the way, an easy way to transfer a small number of files is to put part
of the name in a Special Function key (I do this on an hp terminal):
get "micro:<cpmug.vol
which saves some of the typing (and I don't forget what I'm supposed to use).
dsw, fferd
Fred S. Brundick
USABRL, APG, MD.
<fsbrn@brl-voc>