Article View: news.software.readers
Article #12073Re: Handy .newsrc Unix type script
From: Will Fiveash
Date: Mon, 24 Oct 1994 16:35
Date: Mon, 24 Oct 1994 16:35
26 lines
1782 bytes
1782 bytes
In article <387g30$2oq@oak.zilker.net>, Doctor Lizardo <lizardo@rotten.tic.com> wrote: >My version of grep (Linux) does exactly that with -n. SunOS's grep >does so as well. All you'd need to do is: > >grep -n keyword ~/.newsrc > >And you get the same output without having to muck about with sed & awk. AIX grep understands -n as well but the problem is with the starting line number in .newsrc. In AIX, $ grep -n flight .newsrc 165:comp.sys.ibm.pc.games.flight-sim: 1-26069 while my command returns 164:comp.sys.ibm.pc.games.flight-sim: Trn uses 0 as the starting line number and my shell script compensates for this. The other issue is that if you have a group where the articles read are not contiguous the grep output can be messy. -- Will Fiveash, "My opinions above, facts below." Internet: will@austin.ibm.com
Technical Details
Message-ID:
<Cy6rFC.1y5J@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!nntp.gmd.de!xlink.net!xlink100!smurf.noris.de!msn!faulrs!fauern!news.th-darmstadt.de!terra.wiwi.uni-frankfurt.de!zeus.rbi.informatik.uni-frankfurt.de!news.dfn.de!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!bocanews.bocaraton.ibm.com!portal.austin.ibm.com!awdprime.austin.ibm.com!willReferences:
<Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net>Show Full Headers
Complete Article Headers
Message-ID: <Cy6rFC.1y5J@austin.ibm.com> Subject: Re: Handy .newsrc Unix type script Date: Mon, 24 Oct 1994 16:35:33 GMT From: will@austin.ibm.com (Will Fiveash) References: <Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net> 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!nntp.gmd.de!xlink.net!xlink100!smurf.noris.de!msn!faulrs!fauern!news.th-darmstadt.de!terra.wiwi.uni-frankfurt.de!zeus.rbi.informatik.uni-frankfurt.de!news.dfn.de!swiss.ans.net!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: 26