Xref: utzoo news.newusers.questions:1223 news.misc:4156 alt.sources:1389 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: news.newusers.questions,news.misc,alt.sources Subject: rn cancel macro update Message-ID: <5080@solo9.cs.vu.nl> Date: 11 Jan 90 03:44:46 GMT Reply-To: maart@cs.vu.nl (Maarten Litmaath) Followup-To: news.misc Organization: VU Informatika, Amsterdam, the Netherlands Lines: 33 Now the `Distribution:' field is set correctly (= limited!). ----------8<----------8<----------8<----------8<----------8<---------- #!/bin/sh # @(#)cancel 1.1 89/12/30 Maarten Litmaath # cancel INEWS=/usr/lib/news/inews # figure out if echo is BSD or SYSV test "x`echo -n x`" = xx && n=-n c= || n= c=\\c test $# = 1 || { echo "Usage: `basename $0` " >&2 exit 1 } NEWSGROUPS=`sed -n -e '/^Newsgroups: /{' -e 's///' -e p -e q -e '}' "$1"` IDENT=`sed -n -e '/^Message-ID: /{' -e 's///' -e p -e q -e '}' "$1"` DISTRIBUTION=` sed -n -e '/^$/q' -e '/^Distribution: /{' -e s/// -e p -e q -e '}' "$1" ` test x"$DISTRIBUTION" = x && DISTRIBUTION=world echo "Confirm cancel of article $IDENT in" echo $n "$NEWSGROUPS: [ny] $c" read ans test x"$ans" = xy && $INEWS -c "cancel $IDENT" -n "$NEWSGROUPS" -d "$DISTRIBUTION" \ < /dev/null ----------8<----------8<----------8<----------8<----------8<---------- -- 1755 EST, Dec 14, 1992: Henry Spencer is put on a one-way mission to the moon.| Maarten Litmaath @ VU Amsterdam: maart@cs.vu.nl, uunet!mcsun!botter!maart