Article View: news.software.readers
Article #12012Handy .newsrc Unix type script
From: Will Fiveash
Date: Thu, 20 Oct 1994 00:06
Date: Thu, 20 Oct 1994 00:06
20 lines
1547 bytes
1547 bytes
I use a ksh script to help me when I want to move newsgroups around via
trn. The script (I call it gnewsrc) takes a group name and prints out
the location followed by the newsgroup that matches the name. Here is
the script:
egrep -n "$1" ~/.newsrc|sed 's/:/ /'|awk '{ $1=$1-1; print $1 ":" $2;}'
and here is an usage example:
$ gnewsrc 'ultrix'
1389:comp.unix.ultrix:
8743:umn.local-lists.techc-ultrix-vms!
If I wanted umn.local-lists.techc-ultrix-vms to follow comp.unix.ultrix
I would use trn to move umn.local-lists.techc-ultrix-vms to 1390.
Note, since egrep is used you can use regular expressions as
arguments. Perhaps someone with trn macro skills can do something
macro-ish with this.
--
Will Fiveash, "My opinions above, facts below."
Internet: will@austin.ibm.com
Technical Details
Message-ID:
<Cxy2zH.zI0@austin.ibm.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!mhv.net!metro.atlanta.com!spcuna!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!bocanews.bocaraton.ibm.com!portal.austin.ibm.com!awdprime.austin.ibm.com!willShow Full Headers
Complete Article Headers
Message-ID: <Cxy2zH.zI0@austin.ibm.com> Subject: Handy .newsrc Unix type script Date: Thu, 20 Oct 1994 00:06:53 GMT From: will@austin.ibm.com (Will Fiveash) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!mhv.net!metro.atlanta.com!spcuna!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!bocanews.bocaraton.ibm.com!portal.austin.ibm.com!awdprime.austin.ibm.com!will Newsgroups: news.software.readers Sender: news@austin.ibm.com (News id) Reply-To: will@austin.ibm.com Organization: IBM, Austin, Tx. Lines: 20