[news.software.b] newsgroups fix

morgan@brambo.UUCP (Morgan W. Jones) (03/16/88)

I don't know how widespread this is (the bug or the fix), but if your
newsgroups command never seems to produce any output even though you
know that there are unsubscribed groups, try changing the last four
lines of the newsgroups script to look like this.

/bin/echo "Unsubscribed but mentioned in .newsrc:"
/bin/sed -n < $dotdir/.newsrc \
	-e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' \
	| \
/bin/sort | $pager

It works on our SysVR3.0.

The changes are the addition of the -n and removal of "-e 'd'".

-- 
Morgan Jones - Bramalea Software Inc.        morgan@brambo.UUCP
      ...!{uunet!mnetor!lsuc!ncrcan, utgpu!telly}!brambo!morgan
"These might not even be my opinions, let alone anyone else's."

ccea3@rivm.UUCP (Adri Verhoef) (10/14/88)

Thank you, morgan@brambo.UUCP (Morgan W. Jones),
you wrote a magnificent patch for the newsgroups(1) command.

>I don't know how widespread this is (the bug or the fix), but if your
>newsgroups command never seems to produce any output even though you
>know that there are unsubscribed groups, try changing the last four/five
>lines of the newsgroups script to look like this.

echo "Unsubscribed but mentioned in .newsrc:"
sed -n < $dotdir/.newsrc \
	-e "/$1.*!/"'s/^\([^!]*\)!.*$/\1/p' | \
sort | $pager

[ changed: sed  -->  sed -n
[ deleted: -e 'd'
--
Adri Verhoef, mcvax!rivm!a3,
National Institute of Public Health and Environmental Protection.