💾 Archived View for mirrors.apple2.org.za › archive › apple.cabi.net › FAQs.and.INFO › UNIX.A2.GS.IN… captured on 2023-03-20 at 22:55:49.

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

Path: ns-mx!uunet!indetech!hsv3!mvp
From: mvp@hsv3.UUCP (Mike Van Pelt)
Newsgroups: news.newusers.questions
Subject: Re: Killing articles
Message-ID: <11323@hsv3.UUCP>
Date: 7 Nov 91 23:51:09 GMT
References: <1991Nov6.010708.16496@athena.cs.uga.edu>
Reply-To: mvp@hsv3.UUCP (Mike Van Pelt)
Organization: Video 7 + G2 = Headland Technology
Lines: 114

In article <1991Nov6.010708.16496@athena.cs.uga.edu> jfriday@marie.stat.uga.edu (Paul Stacy) writes:
>There are times when I would like to KILL a certain phrase but I don't
>know how to.  I'm using rn.  I know how to kill the subject I'm on and
>how to put a subjec tline in a KILL file, but I would like to specify
>the thing to be killed myself.
>
>Can anyone help me on this?  I've done it on VAX's Vnews program.

Use "^K" to edit the KILL file --  The lines in the KILL file are

/regular expression/options:command[:command...]

The only place in the "standard" documentation I've seen regular
expressions documented is the man page for ed.

For further info, here's my KILL file doc - or, you can look at
the article on KILL files in news.answers.

-----------------------------------------------
Each newsgroup has its own KILL file, named ~/News/parts/of/group/name/KILL.
There is also a global KILL file, ~/News/KILL, which is done first on entry
to every newsgroup.  You probably don't want to do this.

The easiest way to add to the KILL file is the K  (upper-case)
command.  This puts the current subject into the kill file, with a line
that looks like this:

/: *Useless flame war/:j

In general,  /general expression/options:action.  Default action is "j" 
to junk the article, and there are no default options.  If you type ^K
(control-K) instead, you are put into your default editor on your kill
file.  This gives you the ability to edit the lines to make the search
more general.  In particular, the above only searches for the beginning
of the subject.  ": *" ties the match to the ":" following "Subject:" or
"Re:".  I often find it useful to remove this restriction as follows.

/flame war topic/:j

With no options, it only searches the Subject: header line.  A useful
option is the "h" option to search the entire header.  For instance,

/user@site/h:j
 
will kill all messages from user@site.

Often you want to do this because user@site is a relentless
flame-monger.  Unfortunately, you'll still see all the flaming
responses that his net.contributions generate.  Enter another useful
option, "a", to search to the entire text of the articles.  To kill all
messages that mention the user; most importantly, messages that contain
a line like  "In message <foo@bar>, idiot@turkey.farm said"

/idiot@turkey.farm/a:j

When you start getting this general, it's sometimes nice to see the
subject headers of the articles you kill.  You can string actions
together separated by ":", as follows:

/idiot@turkey.farm/a:=:j

Here's some other useful stuff from my news.groups KILL file.

/alt.flame/h:j
/talk.bizarre/h:j

These search for mention of the groups anywhere
in the header, killing all messages crossposted to these groups.

Note that the strings in the KILL files are full regular expressions.
Check the man page for ed (type "man ed") for more explanation of
regular expressions -- it does *not* work the same as filename
globbing.  You can do all kinds of complex pattern matching if you
wish.  For instance (and this introduces another option, "c", to make
the search case sensitive, normally it's case insensitive)

/: *[^a-z]*$/c:=:j

will kill all articles in which the subject contains no lower-case
letters, on the assumption that people who post in all-caps are more
often idiots than not.  (It's got a bug I haven't bothered to fix.
This was a proof-of-concept, not something I use.  Since Subject: and
Re:  have lower-case, it searches for no-lower-case from the colon to
the end.  If the subject happens to contain a colon, you might kill
more articles than you intend.  This is a case where the = to print the
subject header is especially nice.)

You can also type in a kill line while reading messages.  If you add
the "K" option (uppercase) to the line, it will strip the K off and
append it to the KILL file for that group; a handy shortcut.  Say
there's a gigantic flame war over censorship (a common one whenever
anyone suggests that perhaps a certain article shouldn't have been
posted), you can type /censor/Ka:=:j and censor the flame war.

You can use /search string/options:action for other things than
killing trash articles.  /[XV]GA/ca:= will print the article number
and subject header for every message that contains the string
VGA or XGA.  This would work in a KILL file, and would print the 
subjects of the articles without killing them.

Note that if the first action is "m" or "M", the search assumes the
"r" option, to search already-read articles.  You can defeat this
by adding an = action first.  (/string/:=:M)   (The "r" option is also
one way of getting back articles junked by an over-general KILL.)

Since the options to search more text take longer, I have all the
ordinary subject header searches first in my KILL file, then the header
searches, and finally the text search.

-- 
Mike Van Pelt                                 "Hey, hey, ho ho,
Headland Technology/Video 7                   Western culture's got to go."
....ames!vsi1!hsv3!mvp                         Stanford students and faculty.
mvp@hsv3.lsil.com