Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site polaris.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!cmcl2!philabs!polaris!charliep From: charliep@polaris.UUCP (Charlie Perkins) Newsgroups: net.sources Subject: Archiving /usr/spool/oldnews Message-ID: <299@polaris.UUCP> Date: Thu, 21-Nov-85 20:49:49 EST Article-I.D.: polaris.299 Posted: Thu Nov 21 20:49:49 1985 Date-Received: Sun, 24-Nov-85 11:09:03 EST Reply-To: charliep@polaris.UUCP (Charlie Perkins) Organization: IBM Research, Yorktown Heights, N.Y. Lines: 54 ========= Arch_oldnews creates "nice" (but BIG) output suitable for printing out on a line printer. I use it to keep hardcopy listings of the news articles when I expire them, so that conceivably people could search through the listings to find interesting articles and retrieve them from the tapes. Anyway, it is useful. This program grew to about 5 times its original size and could very reasonably become a C program now. ================================================= arch_oldnews ================================================= /bin/rm -f /tmp/arch_oldnews cat <<'arch_oldnews' > /tmp/arch_oldnews newsgroup= export newsgroup if test -d $1 then newsgroup=`echo $1 | sed "s;/usr/spool/oldnews/*;;"` (echo ; echo $newsgroup ; echo " "; echo " ") > /tmp/directoryxyzq elif test -f $1 then subject=`grep '^Subject:' $1 | sed 's/Subject: // 1q'` case "$subject" in "") exit esac messageID=`grep '^Message-ID:' $1 | sed 's/^Message-ID: <\(.*\)>/\1/` msgsize=`expr "$messageID" : '.*'` if test "$msgsize" -ge 16 then tabs=" " else tabs=" " fi if test -s /tmp/directoryxyzq then cat /tmp/directoryxyzq cat /dev/null > /tmp/directoryxyzq fi echo `basename $1`": $messageID$tabs$subject" fi arch_oldnews chmod 755 /tmp/arch_oldnews cd /usr/spool/oldnews find fa net mod na nj -exec /tmp/arch_oldnews {} \; rm /tmp/arch_oldnews -- Charlie Perkins, IBM T.J. Watson Research philabs!polaris!charliep, perk%YKTVMX.BITNET@berkeley, perk.yktvmx.ibm@csnet-relay