Xref: utzoo news.newusers.questions:1107 news.misc:3997 alt.sources:1333 comp.unix.questions:18570 Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: news.newusers.questions,news.misc,alt.sources,comp.unix.questions Subject: rn cancel macro + script Message-ID: <4912@pinas.cs.vu.nl> Date: 21 Dec 89 22:39:01 GMT Reply-To: maart@cs.vu.nl (Maarten Litmaath) Followup-To: news.misc Organization: VU Informatika, Amsterdam, the Netherlands Lines: 39 On many (most?) rn installations the `C' cancel command ALWAYS results in: You can't cancel someone else's article This article offers a work-around. Put the following rn macro in the file `.rnmac' in the directory containing your `.newsrc'. ----------8<----------8<----------8<----------8<----------8<---------- C %(%m=[ap]?!cancel %A^J:C) ----------8<----------8<----------8<----------8<----------8<---------- Put the following `cancel' command somewhere in your PATH. ----------8<----------8<----------8<----------8<----------8<---------- #!/bin/sh # cancel # author: maart@cs.vu.nl 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"` echo "Confirm cancel of article $IDENT in" echo $n "$NEWSGROUPS: [ny] $c" read ans test x"$ans" = xy && $INEWS -t "cmsg cancel $IDENT" -n "$NEWSGROUPS" < /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