Path: 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 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"