Article View: news.software.readers
Article #12113Re: Handy .newsrc Unix type script
From: Per Hedeland
Date: Tue, 25 Oct 1994 22:27
Date: Tue, 25 Oct 1994 22:27
23 lines
1742 bytes
1742 bytes
In article <Cy6rFC.1y5J@austin.ibm.com> will@austin.ibm.com (Will Fiveash) writes:
>In article <387g30$2oq@oak.zilker.net>,
>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.
But you don't need to run three programs for it:
awk /"$1"/'{print NR-1 ":" $1}' $HOME/.newsrc
--Per Hedeland
per@erix.ericsson.se or
per%erix.ericsson.se@sunic.sunet.se or
..uunet!erix.ericsson.se!per
Technical Details
Message-ID:
<38k0oo$pvc@euas20.eua.ericsson.se>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!Germany.EU.net!EU.net!sunic!erinews.ericsson.se!eua.ericsson.se!erix.ericsson.se!perReferences:
<Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net> <Cy6rFC.1y5J@austin.ibm.com>Show Full Headers
Complete Article Headers
Message-ID: <38k0oo$pvc@euas20.eua.ericsson.se> Subject: Re: Handy .newsrc Unix type script Date: Tue, 25 Oct 1994 22:27:36 +0000 From: per@erix.ericsson.se (Per Hedeland) References: <Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net> <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!Germany.EU.net!EU.net!sunic!erinews.ericsson.se!eua.ericsson.se!erix.ericsson.se!per Newsgroups: news.software.readers Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden Lines: 23 NNTP-Posting-Host: super.eua.ericsson.se NNTP-Posting-User: per