Xref: utzoo news.software.b:1664 news.sysadmin:1063 Path: utzoo!attcan!uunet!pyrdc!pyrnj!romain From: romain@pyrnj.uucp (Romain Kang) Newsgroups: news.software.b,news.sysadmin Subject: netnews cancer surgeon Keywords: microsoft articles cancer duplicates Message-ID: <3229@pyrnj.uucp> Date: 11 Oct 88 04:22:16 GMT References: <165@att.ATT.COM> Reply-To: romain@pyrnj.UUCP (Romain Kang) Organization: Pyramid Technology Corp, Woodbridge, NJ Lines: 32 For those of you who don't yet have an automated procedure to get rid of the 5000-odd articles your site may have already received, here's my hack: #! /bin/sh # # Side effect: creats rm-stdin in SPOOLDIR # PATH=/bin:/usr/bin: LIBDIR=/usr/lib/news HISTORY=$LIBDIR/history SPOOLDIR=/usr/spool/news #GREP=/usr/local/bin/bm GREP=egrep cd $SPOOLDIR if [ ! -f rm-stdin ]; then cat >> rm-stdin.c << 'EoF' main() { char in[128]; while (gets(in)) { if (unlink(in) < 0) perror(in); } } EoF cc -o rm-stdin rm-stdin.c fi # "microsoft\t25144" $GREP "microsoft 25144" $HISTORY | sed -n -e '/ $/d' -e 's/.* \(.*\) *$/\1/' -e 's/ $//' \ -e 's/\./\//gp' | ./rm-stdin