[net.sources] Two uucp tools

chinn@apcisea.UUCP (04/10/87)

Every so once in a while, there is uucp stuff
queued to another system that shouldn't be. (run
away news, someone who has decided against sending
hate mail, etc).  There usually isn't all that much,
so I generally delete the stuff by hand.

I was playing with regular expressions, and too
lazy to look up the flags to uuclean, so I whipped
up these two shell scripts..  

The first, uuvsf (uu view spool files) allows you
to look at the file in the D.sysname directory when
given the name of a file in the C. directory.

The second, uursf (uu remove spool file) allows you
to remove the piece in bothe the D.sysname directory
and the D.sysnameX directory, given the name of the C.
file.

Of course, these scripts only work on BSD4.2 like uucp's...
but, they are only a couple of lines each, and should
be easily modified for any flavor of uucp you happen
to have.

These are NOT shar files; Have fun....


...uw-beaver                                    david m. chinnn
    !tikal!pilchuck                             apollo computer inc
        !apcisea!chinn                          bellevue, washington

uuvsf:
-------cut-------cut---------cut----------cut----------
sed -e '1s/^.* - \(D.*\) .*$/cat \/usr\/spool\/uucp\/D.apcisea\/\1/;
             2d' /usr/spool/uucp/C./$1 >vdata
sh vdata
rm vdata
-------cut-------cut---------cut----------cut----------
uursf:
-------cut-------cut---------cut----------cut----------
#! /bin/sh
#set -x
for nfile in $* 
do
     sed -e '1s/^.* - \(D.*\) .*$/rm \/usr\/spool\/uucp\/D.apcisea\/\1/;
             2s/^.* - \(D.*\) .*$/rm \/usr\/spool\/uucp\/D.apciseaX\/\1/' /usr/spool/uucp/C./$nfile >/tmp/rmdata
     rm /usr/spool/uucp/C./$nfile
done
sh /tmp/rmdata
rm /tmp/rmdata
-------cut-------cut---------cut----------cut----------