bill@utastro.UUCP (William H. Jefferys) (01/06/85)
Here is a useful shellscript that can be used for downloading groups of files into your Mac with a single command line. It adds the usual wildcard filenames to macput and uses macput (which must be in your path). The option used by macput is determined by the extension of the filename: .rsrc uses the -r option, and .data uses the -d option, and all other files are transmitted with the -u option.. You can download an entire directory with the single command macsend * Then go out for a beer, watch TV, etc. macsend will alert you by ringing the Mac bell (gong?) when it is finished. With a two drive system, you can download nearly 400 KB of information by having the active MacTerminal document on the nearly empty disk in the external drive and MacTerminal itself in the internal drive. Name the fillowing file "macsend" and set it to be executable: --------------------cut here--------------------------- #! /bin/sh # Shellscript for transmitting groups of files to a Macintosh via macput. # Invokes /bin/sh upon entry. # Files with the extension .rsrc will be sent as resource files using # the -r option. # Files with the extension .data will be sent as data files using # the -d option. # All other files will be sent as text files using the -u option. # This shellscript will ignore directories and files that are unreadable. # Wildcards may be used. Thus, to transmit all files beginning with # a capital letter, use "macsend [A-Z]*" # Upon termination of the operation, the Macintosh bell will ring # three times. This is your clue to leave the TV and get # back to work. # Be sure that macput is in your path, otherwise the shellscript won't work! # mesg n for f in $* do if [ -f $f ] && [ -r $f ] then case $f in *.data) echo " macput -d $f" macput -d $f ;; *.rsrc) echo " macput -r $f" macput -r $f ;; *) echo " macput -u $f" macput -u $f ;; esac fi done echo echo echo mesg y -- "Men never do evil so cheerfully and so completely as when they do so from religious conviction." -- Blaise Pascal Bill Jefferys 8-% Astronomy Dept, University of Texas, Austin TX 78712 (USnail) {allegra,ihnp4}!{ut-sally,noao}!utastro!bill (uucp) bill%utastro.UTEXAS@ut-sally.ARPA (ARPANET)