[net.news.b] Destructive N Command -- Wishlist

alb@alice.UUCP (10/12/83)

Once again, I call for a destructive N command.  Briefly, it would
have the same function as N, the only difference being that it would
record all the current articles in the particular group as read
(i.e. you wouldn't get them next time)  With the greater and
greater traffic flow these days, this is becoming increasingly
necessary.  Why don't I just unsubscribe to the groups?  Because
I don't want to; why should I throw out some worthwhile articles
because the rest of the group is trash.  I do not hold the opinion
that new groups should be created so that isolated discussions can
be turned off by unsubscribing.  For example, I read net.jokes;
maybe 30% of the time, I'll actually read the jokes; the other times,
I don't have time.  Why should I 'n' through them all or exit and
edit my .newsrc?

darrell@drux3.UUCP (10/12/83)

I agree.  Many times I'll come back to work after a day or two off
and will find some newsgroups with several hundred articles.  Although
I usually like to read them, I don't have time to go through that many
articles.  A destructive N command would be extremely helpful in that
case.  It would save me hours of reading or would eliminate the need
to update my .newsrc file.
-- 
Darrell McIntosh, AT&T Information Systems Laboratories, Denver
(303) 538-3212, {ihnp4|hogpc}!drux3!darrell

nazgul@apollo.UUCP (Kee Hinckley) (10/13/83)

Request seconded, with fervor!

                    -kee

charliep@tekgds.UUCP (Charles E. Perkins) (10/27/83)

-----------
I put together a script called "resetnews" that takes newsgroups
as parameters and tries to do a slightly more efficient job at
ignoring unread news than does "readnews -p > /dev/null".  If
no parameters are given it updates your NEWSRC file to ignore
unread news in ALL newsgroups.  I do not claim that it is
bulletproof, just that it has worked for me.  It is written
for news2.10, but a trivial modification will make it work for
news2.9 as well.

Charles Perkins

PS.  I thought it was to short to post to net.sources.
PPS. Yeah, it would be nice to do this inside "readnews" and "vnews".
____________________________________________________________________

active=/usr/lib/news/active
if test $# = 0
then
	set `cat $active | sed s/\ .*//`
fi
cd $HOME
newsrc=`echo ${NEWSRC-"$HOME"/.newsrc}`
cp $newsrc /tmp/newsrc1$$
for groupname in $*
do
	groupdir=`echo $groupname | tr '.' '/'`
	if test -d /usr/spool/news/$groupdir
	then
		hibound=`grep $groupname $active | sed "s/.*\ 0*//"`
		hibound=`echo $hibound | sed "s/\ .*//"`
		if test -n $hibound
		then
			sed "s/^\($groupname.\)\ .*/\1 1-$hibound/" < /tmp/newsrc1$$ > /tmp/newsrc2$$
			mv /tmp/newsrc2$$ /tmp/newsrc1$$
		else
			echo $groupname is not in $active!
		fi
	else
		echo $groupdir does not exist!
	fi
done
if test -f $newsrc
then
	oldnewsrc=$HOME/old.`basename $newsrc`
	mv $newsrc $oldnewsrc
	echo "The file $oldnewsrc contains your old $newsrc file."
fi
mv /tmp/newsrc1$$ $newsrc