Article View: news.software.readers
Article #638Re: Wanted: SIMPLE .newsrc sorter
From: Ger Timmens
Date: Wed, 25 Sep 1991 10:05
Date: Wed, 25 Sep 1991 10:05
65 lines
2267 bytes
2267 bytes
gt4824a@prism.gatech.EDU (Paul Beker) writes: >I am looking for some simple way to sort my .newsrc, without having to >change readers or learn all about GNU, etc. The only thing I really >want to do is to sort it in the following way: > 1) All git.* (local) groups first, alphabetized. > 2) All remaining groups in my .newsrc, alphabetized. Here's a simple sh prog. I wrote, Have fun, Ger ------------------- Cut here ----------------------------------------- #! /bin/sh # # NAME # newssort # # DESCRIPTION # newssort sorts the news resource file in the users home # directory. # Order of appearance of newsgroups: # # Local newsgroups (sorted, even if not selected) # # Selected newsgroups (sorted, read articles present) # # Selected newsgroups (sorted, no read articles or empty) # # Unselected newsgroups (sorted, read articles present) # # Unselected newsgroups (sorted, no read articles or empty) # # # AUTHOR # Ger Timmens # # DATE # 25 September 1991 # NEWSRC=$HOME/.newsrc LOCAL=tnofel LOCAL_FILE=$NEWSRC.local SELECTED_FILE=$NEWSRC.selected UNSELECTED_FILE=$NEWSRC.unselected egrep -v '^$' $NEWSRC > $NEWSRC.bak fgrep -i $LOCAL $NEWSRC.bak | sort -o $LOCAL_FILE fgrep -i -v $LOCAL $NEWSRC.bak | fgrep -i -v ! | sort -o $SELECTED_FILE fgrep -i -v $LOCAL $NEWSRC.bak | fgrep -i -v : | sort -o $UNSELECTED_FILE cat $LOCAL_FILE > $NEWSRC echo >> $NEWSRC egrep -v ':$' $SELECTED_FILE >> $NEWSRC echo >> $NEWSRC egrep ':$' $SELECTED_FILE >> $NEWSRC echo >> $NEWSRC egrep -v '!$' $UNSELECTED_FILE >> $NEWSRC echo >> $NEWSRC egrep '!$' $UNSELECTED_FILE >> $NEWSRC
Technical Details
Message-ID:
<1991Sep25.100543.23294@fel.tno.nl>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!mcsun!hp4nl!tnofel!felfs!gtir5References:
<36690@hydra.gatech.EDU>Show Full Headers
Complete Article Headers
Message-ID: <1991Sep25.100543.23294@fel.tno.nl> Subject: Re: Wanted: SIMPLE .newsrc sorter Date: Wed, 25 Sep 1991 10:05:43 +0000 From: gtir5@fel.tno.nl (Ger Timmens) References: <36690@hydra.gatech.EDU> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!gmdzi!unido!mcsun!hp4nl!tnofel!felfs!gtir5 Newsgroups: news.software.readers Organization: TNO Physics and Electronics Laboratory Lines: 65