[news.software.b] Long lines in .newsrc

rootc@ucselx.sdsu.edu (System Admin) (02/17/90)

I currently have rn patchlevel 39.  The problem is that the lines in
.newsrc keep growing and growing.  Vi complains about lines being too
long if I try to edit .newsrc.  Arbitron is beginning to skip a large
number of newsgroups because sort rejects various newsgroups complaining
that the line is too long.  The lines are about 1024 characters long.

Is there a patch to rn that addresses this problem?

amos@nsc.nsc.com (Amos Shapir) (02/17/90)

There's no patch to rn, but it can be easily fixed by a small command
file which was posted here a few months ago:
---------------------------------------------------
#!/bin/sh
# Usage: shrink.newsrc
#
# Shrink out all the commas in unsubscribed to groups.
#	(i.e. mark skipped articles as read)

cp $HOME/.newsrc o.newsrc
sed < $HOME/.newsrc 's/^\([^!]*![^,-]*\).*[,-]\(.*\)/\1-\2/' > /tmp/newsrc$$ &&
mv /tmp/newsrc$$ $HOME/.newsrc
ls -l o.newsrc $HOME/.newsrc
---------------------------------------------------
There was also a companion program sort.newsrc which sorts .newsrc
into any desirable order.

-- 
	Amos Shapir
National Semiconductor, 2900 semiconductor Dr.
Santa Clara, CA 95052-8090  Mailstop E-280
amos@nsc.nsc.com or amos@taux01.nsc.com