Article View: comp.unix.shell
Article #1328Re: Rebuild a .newsrc file
From: Lawrence V. Cipriani
Date: Wed, 03 Oct 1990 01:40
Date: Wed, 03 Oct 1990 01:40
19 lines
1111 bytes
1111 bytes
In article <2713@crdos1.crd.ge.COM>, davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes:
>
> Someone asked about rebuilding a .newsrc file.
Here's a pretty quick one in awk.
# this will create a .newsrc for folks showing that they've suscribed
# to all groups and haven't read anything. This keeps rn from bothering
# the new user with hundereds of "... not in .newsrc. Add[y/n]? " messages.
awk '{
if($3 > 0) {
printf("%s: 1-%d\n", $1, $3-1);
} else {
printf("%s: \n", $1);
}
}' /usr/lib/news/active > .newsrc
--
Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com
"Save a logger, eat an owl"
Technical Details
Message-ID:
<1990Oct3.014039.27275@cbnews.att.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!cbnews!lvcReferences:
<2713@crdos1.crd.ge.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!att!cbnews!lvc From: lvc@cbnews.att.com (Lawrence V. Cipriani) Newsgroups: comp.unix.shell Subject: Re: Rebuild a .newsrc file Summary: awk script Keywords: news Message-ID: <1990Oct3.014039.27275@cbnews.att.com> Date: 3 Oct 90 01:40:39 GMT References: <2713@crdos1.crd.ge.COM> Organization: Ideology Busters Inc. Lines: 19