Article View: news.software.readers
Article #24044Re: Keeping List of Newsgroups Sorted in SLRN
From: Bennett Todd
Date: Fri, 12 Jul 1996 00:00
Date: Fri, 12 Jul 1996 00:00
29 lines
1581 bytes
1581 bytes
On 12 Jul 1996 13:27:58 GMT, Jeffrey C. Ollie <jollie@worf.netins.net> wrote:
>[...]
>Actually I was thinking of creating a shell script named "slrn" and
>putting it earlier on my path. The script would sort the .jnewsrc and
>then invoke the real slrn binary. This would probably tide me over
>until sorting could be implemented internally.
How about:
#!/bin/sh
tmp=/tmp/`basename $0`.$$
trap "rm -f $tmp" 0
f=$HOME/.jnewsrc
(grep ':' $f; grep -v ':' $f | sort) >$tmp
mv $tmp $f
exec /usr/local/bin/slrn ${1+"$@"}
Of course if you want you subscribed groups all mixed in to the unsubscribed
ones, you could change the grep-grep-sort idiom to a simple sort:
sort $f >$tmp
but I would personally want to keep the unsubscribed groups after the
subscribed ones, and keep the subscribed ones in whatever order I've chosen.
-Bennett
Technical Details
Message-ID:
<slrn4ucspq.1na.bet@ritz.mordor.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn44ubl6u.d10.jollie@worf.netins.net> <slrn4ubr0i.9d.cbbrowne@dantzig.nodomain.nowhere> <slrn44uckmu.qff.jollie@worf.netins.net>Show Full Headers
Complete Article Headers
Message-ID: <slrn4ucspq.1na.bet@ritz.mordor.com> Subject: Re: Keeping List of Newsgroups Sorted in SLRN Date: Fri, 12 Jul 1996 00:00:00 +0000 From: bet@ritz.mordor.com (Bennett Todd) References: <slrn44ubl6u.d10.jollie@worf.netins.net> <slrn4ubr0i.9d.cbbrowne@dantzig.nodomain.nowhere> <slrn44uckmu.qff.jollie@worf.netins.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 168013172 Sender: bet@ritz.mordor.com (Bennett Todd) Organization: Mordor International Newsgroups: news.software.readers