Article View: news.software.nntp
Article #11049Re: How can i remove groups with wildcard?
From: James Brister
Date: Sat, 21 Sep 1996 00:00
Date: Sat, 21 Sep 1996 00:00
33 lines
1606 bytes
1606 bytes
jem@xpat.com (John Milburn) writes:
> Sorry James, I couldn't see any clear way to make a cute single line
> perl monstrosity out of this.
Now there's a challenge I can't refuse...
The following (not too throughly tested, and I cheat a bit). It will do
multiple patterns at once too.
Left readably formatted, but still legal (if you run a bash-like shell).
perl -e 'die unless @ARGV;
open(P,". /var/news/etc/innshellvars ; set|");
while(<P>){$c="$1/ctlinnd" if /^NEWSBIN=(.*)/;
$a=$1 if /^ACTIVE=(.*)/;
$oa=$1 if /^OLDACTIVE=(.*)/;
$na=$1 if /^NEWACTIVE=(.*)/;}
print "$ctlinnd throttle removing groups;\n";
open(A,"<$a")||die;
open(NA,">$na")||die;
$re=join ("|",@ARGV) ;
while(<A>){print NA unless /^${ARGV[0]/;}
close(A);close(NA);`mv $a $oa && mv $na $a ; $c go removing groups`
' alt.binaries.* rec.food.*
James
--
James Brister brister@vix.com
Internet Software Consortium inn@isc.org
Technical Details
Message-ID:
<yy3ohiza36r.fsf@bb.home.vix.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<01bba60b$83f8eac0$15507ea8@cloud.hist.co.kr>Show Full Headers
Complete Article Headers
Message-ID: <yy3ohiza36r.fsf@bb.home.vix.com> Subject: Re: How can i remove groups with wildcard? Date: Sat, 21 Sep 1996 00:00:00 +0000 From: James Brister <brister@vix.com> References: <01bba60b$83f8eac0$15507ea8@cloud.hist.co.kr> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 184470351 Sender: brister@bb.home.vix.com Organization: Internet Software Consortium Newsgroups: news.software.nntp