[net.sources] delCD, a script to delete related uucp C.* and D* files

jeff@heurikon.UUCP (Jeffrey Mattox) (05/19/85)

If you've every tried to intercept and stop outgoing mail by
removing the three C.* and D.* files created by uucp, then
this script will help.  The problem comes when there are a
whole bunch of C.* and D.* files in /usr/spool/uucp.  Which
ones are for the specific message you're trying to delete?

Instructions.
1.  Put the following sh script in /usr/spool/uucp/delCD 
2.  To use, find one of the three files you're after.
    Any one of them will do.  For example,
	grep familiar-text-string D*
3.  Use "delCD" with a single argument: the C.* or one of
    the D.* file names.  Example:
	delCD D.heurikoN631f

------------------cut here---------------------------------------
:
if test $# -eq 0 ; then
    echo usage: $0 [CD]filemane ...
    exit
fi
for i do
    echo processing: $i
    case $i in
	C.*)	echo rm `cat $i | cut -f2 -d" "` $i
		rm `cat $i | cut -f2 -d" "` $i ;;
	D.*)	if set `grep -l "^S $i" /usr/spool/uucp/C.*` "" ; then
		    echo rm `cat $1 | cut -f2 -d" "` $1
		    rm `cat $1 | cut -f2 -d" "` $1
		else
		    echo none removed
		fi
		;;
	*)	echo usage: $0 [CD]filemane ...
		;;
    esac
done
------------------cut here---------------------------------------
-- 
/"""\	Jeffrey Mattox, Heurikon Corp, Madison, WI
|O.O|	{harpo, hao, philabs}!seismo!uwvax!heurikon!jeff  (news & mail)
\_=_/				     ihnp4!heurikon!jeff  (mail - best)