🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #11036

Re: How can i remove groups with wildcard?

#11036
From: John Milburn
Date: Fri, 20 Sep 1996 00:00
57 lines
2065 bytes
[Bogus inet distribution removed. Email to original poster.]

James Brister <brister@vix.com> writes:
>"jungjun LEE" <lee@hist.co.kr> writes:

>> i want to remove groups with wildcard
>> for example..
>> ctlinnd rmgroup vmsnet.*

>If you're doing mass deletion or creation of groups, you're best off
>throttling the server and editing the active file with vi.

More specifically (since the original questioner is a local user), use
something like the following script.  Error checking should be added,
for thos who need it. :) You must run this as user news, and must ensure
that innd is already running.

Sorry James, I couldn't see any clear way to make a cute single line
perl monstrosity out of this.

-jem
John Milburn          Pohang, Korea         jem@xpat.com
"I'm afraid I'm not personally qualified to confuse cats." -Python

#!/bin/sh
#
# Accepts an egrep style regex, and removes matches from the
# active file.
#
# John Milburn - jem@xpat.com - 96.9.20

prog=`basename $0`
numargs=$#
if [ $numargs -ne 1 ] ; then
	echo ${prog}: usage \`$prog regex\`
	exit 1
fi
regexp=$1

. /var/news/lib/innshellvars

CTLINND=${NEWSBIN}/ctlinnd

${CTLINND} throttle 'removing groups'

${EGREP} -v ${regexp} ${ACTIVE} >${NEWACTIVE}

mv ${ACTIVE} ${OLDACTIVE}
mv ${NEWACTIVE} ${ACTIVE}

${CTLINND} reload active update
${CTLINND} go 'removing groups'

exit 0

Technical Details
Message-ID: <9087987$kuhiu@xpat.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <01bba60b$83f8eac0$15507ea8@cloud.hist.co.kr> <yy3ybi6myr4.fsf@velo.pp.vix.com>

Show Full Headers
Complete Article Headers
Message-ID: <9087987$kuhiu@xpat.com>
Subject: Re: How can i remove groups with wildcard?
Date: Fri, 20 Sep 1996 00:00:00 +0000
From: jem@xpat.com (John Milburn)
References: <01bba60b$83f8eac0$15507ea8@cloud.hist.co.kr> <yy3ybi6myr4.fsf@velo.pp.vix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 184103129
Organization: Xpat, Pohang, Korea
Reply-to: jem@xpat.com (John Milburn)
Newsgroups: news.software.nntp,han.news.admin