Rebuild a .newsrc file
Lawrence V. Cipriani
lvc at cbnews.att.com
Wed Oct 3 11:40:39 AEST 1990
In article <2713 at crdos1.crd.ge.COM>, davidsen at 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 at cbvox.att.com
"Save a logger, eat an owl"
More information about the Comp.unix.shell
mailing list