home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
- # get_files - by Scott E. Garfinkle (seg@smsdpg.uu.net)
- # create and execute uucp commands based on extract from uunet's ls-lR
- if($#argv == 1) then
- set fn=$1
- else
- set fn=want
- endif
- set tfile=temp.$$
- set tfile2=temp2.$$
- cat > $tfile << 'XX' # sed script
- /^$/d
- /:$/s// :/
- /^d/d
- s/^-.*198[6789] //
- s/^-.*[0-5][0-9] //
- 'XX'
- cat > $tfile2 << 'XX' # awk script
- $0 ~ /.*:/ { prefix = $1 }
- $0 !~ /.*:/ { printf "%s/%s\n", prefix, $0 }
- 'XX'
- sed -f $tfile < $fn | awk -f $tfile2 | \
- sed 's;/usr/spool/ftp\(.*\);uucp -d uunet\!\\~uucp\1 ~uucp\1;' | \
- (echo "Executing following commands:" > /dev/tty; tee /dev/tty) | \
- sh -s
- rm $tfile $tfile2
-
-