Article View: news.software.nntp
Article #30485Re: active file editing
From: Elena Samsonova
Date: Fri, 14 Aug 1998 00:00
Date: Fri, 14 Aug 1998 00:00
66 lines
2221 bytes
2221 bytes
romank@graphnet.com wrote: > > Hi all, > > has anyone ever had to edit the active file? Sure, I have. > I need to get it down to the following: > > all the alt. except: > > alt.binaries > alt.bainaries > alt.binairies > alt.sex > alt.personals > alt.warez > > all the comp. except: > > comp.binaries > > all the misc. except: > > misc.jobs > > all the news, talk, soc, sci and rec > > I _really_ don't want to do this manually... Does anyone know of a way to > automate this, or have an active file that is similar? If you run it on UNIX, use the shell script below (note the new lines in the grep command, they are intentional). If you are on NT, sorry... #!/bin/sh # News groups filtering # Original active file is saved in active.old. grep '^alt\.' active | grep -v '^alt\.binaries\. ^alt\.bainaries ^alt\.binairies ^alt\.sex ^alt\.personals ^alt\.warez' > active.new grep '^comp\.' active | grep -v '^comp\.binaries\.' >> active.new grep '^misc\.' active | grep -v '^misc\.jobs\.' >> active.new grep '^news\. ^talk\. ^soc\. ^sci\. ^rec\.' active >> active.new mv active active.old mv active.new active echo All done. # end of shell script This will work on IRIX and Linux, but I don't know about other UNIXs--never tested it there. If it does not work, check pattern handling by your 'grep'. Good luck Elena
Technical Details
Message-ID:
<35D41BB5.31F143B9@wxs.nl>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:
<6qssev$dpg$1@nnrp1.dejanews.com>Show Full Headers
Complete Article Headers
Message-ID: <35D41BB5.31F143B9@wxs.nl> Subject: Re: active file editing Date: Fri, 14 Aug 1998 00:00:00 +0000 From: Elena Samsonova <E.Samsonova@wxs.nl> References: <6qssev$dpg$1@nnrp1.dejanews.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-mail X-Deja-AN: 381071592 Content-Transfer-Encoding: 7bit To: romank@graphnet.com Content-Type: text/plain; charset=us-ascii X-Complaints-To: postmaster@wxs.nl X-Trace: reader2.wxs.nl 903093283 9644 145.220.24.151 (14 Aug 1998 11:14:43 GMT) Organization: World Access / Planet Internet Mime-Version: 1.0 NNTP-Posting-Date: 14 Aug 1998 11:14:43 GMT Newsgroups: news.software.nntp