🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #12273

Re: Handy .newsrc Unix type script

#12273
From: Will Fiveash
Date: Mon, 31 Oct 1994 19:15
26 lines
1868 bytes
In article <38k0oo$pvc@euas20.eua.ericsson.se>,
Per Hedeland <per@erix.ericsson.se> wrote:
>In article <Cy6rFC.1y5J@austin.ibm.com> will@austin.ibm.com (Will Fiveash) writes:
>>
>>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

On AIX v3.2.5 the above command returns:
awk: Input line misc.forsale: 1-3710 cannot be longer than 3,000 bytes.

 The input line number is 702. The file is /u/will/.newsrc.
 The source line number is 1.

But I did get it to work using "cut" like so:

cut -f1 -d' ' $HOME/.newsrc|awk /"$1"/'{print NR-1 ":" $1}'

Thanks for the tip.
-- 
Will Fiveash,  "My opinions above, facts below."
Internet:  will@austin.ibm.com 
Technical Details
Message-ID: <CyJxHC.62Iu@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!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!news.ecn.bgu.edu!usenet.ins.cwru.edu!gatech!swiss.ans.net!newsgate.watson.ibm.com!watnews.watson.ibm.com!bocanews.bocaraton.ibm.com!portal.austin.ibm.com!awdprime.austin.ibm.com!will
References: <Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net> <Cy6rFC.1y5J@austin.ibm.com> <38k0oo$pvc@euas20.eua.ericsson.se>

Show Full Headers
Complete Article Headers
Message-ID: <CyJxHC.62Iu@austin.ibm.com>
Subject: Re: Handy .newsrc Unix type script
Date: Mon, 31 Oct 1994 19:15:10 GMT
From: will@austin.ibm.com (Will Fiveash)
References: <Cxy2zH.zI0@austin.ibm.com> <387g30$2oq@oak.zilker.net> <Cy6rFC.1y5J@austin.ibm.com> <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!newsserver.jvnc.net!news.cac.psu.edu!news.pop.psu.edu!psuvax1!news.ecn.bgu.edu!usenet.ins.cwru.edu!gatech!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