Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site daemon.UUCP Path: utzoo!linus!decvax!ucbvax!ucbcad!tektronix!daemon!damonp From: damonp@daemon.UUCP Newsgroups: net.unix-wizards Subject: Re: uucp request removal Message-ID: <279@daemon.UUCP> Date: Thu, 28-Jun-84 15:58:50 EDT Article-I.D.: daemon.279 Posted: Thu Jun 28 15:58:50 1984 Date-Received: Sat, 30-Jun-84 07:20:04 EDT Organization: Tektronix, Beaverton OR Lines: 69 [eat me] Below is something I scraped together the other week. Slow, but affective. Works only for X. jobs. Should be easily modified. :::::::::::::: Xclean :::::::::::::: : : Xclean - clean up dead X.files : SPOOL=/usr/spool/uucp mkdir $SPOOL/badX. cd $SPOOL/X. find . -type f -print\ | sed \ -e 's:./::'\ -e 's:.*:\ if [ `/usr4/damonp/bin/Xclean.0 < &` = y ] ; then\ mv & ../badX./&;\ fi:' \ | sh :::::::::::::: Xclean.0 :::::::::::::: : : Xclean.0 - helper of Xclean : : Input: : The possibly offending X.file : : Output: : "y", if the file should be removed : "n", otherwise : SPOOL=/usr/spool/uucp SITE=`uuname -l` while read a1 a2 a3 a4 a5; do case $a1 in U|Z|C) ;; I|F) case $a2 in D.${SITE}*) DIR=$SPOOL/D.$SITE ;; *) DIR=$SPOOL/D. ;; esac if [ ! -f $DIR/$a2 ] ; then echo $DIR/$a2 >>/tmp/X.missing echo "y" exit 0 fi ;; *) echo "Unknown card: $a1 $a2 $a3 $a4 $a5" exit 0 ;; esac done echo "n" exit 0