[news.admin] doinpaths

tale@pawl.rpi.edu (David C Lawrence) (10/15/89)

Well, seems as though the B News version of this little script I
posted a couple of weeks ago did have a few problems that made it much
less efficient on B News systems.

In e-mail, Scott Leadley informed me of the following (used with
permission):
Scott> 	I like your little script to find pathnames for inpaths, but
Scott> it was creating in excess of 20,000 bogus filenames on our
Scott> system (uhura.cc.rochester.edu).  There were two problems:
Scott> 	- cancelled messages generated a filename of "cancelled"
Scott> 	- lines in history that ended with a blank generated a filename of ""

The C News version doesn't have these problems, but here's a version
that does things better for B News.  Thanks, Scott.

#! /bin/sh
# A simple script to set up the input for inpaths before running it.    
# It should work just fine for B News when the following batch of variables
# is set for your system.  Normally this will be run from cron near
# the end of each month.
#
# 23 Sep 89 -- tale@pawl.rpi.edu
# Modified to eliminate unnecessary empty and "cancelled" lines.
# 5 Oct 89  -- leadley@cc.rochester.edu

PATH=/bin:/usr/bin:/usenet/bin.server
NEWSARTS=/usenet/spool
NEWSCTL=/usenet/lib
NEWSHOST=`hostname`
PATHSURVEY=pathsurvey@decwrl.dec.com,usenet

cd $NEWSARTS
# Hard tab for cut delimiter
cut -f3- "-d	" $NEWSCTL/history | # Grab the article names
    tr -s '. ' '/\012'             | # list pathnames, one per line
    egrep -v '^cancelled$'         | # junk cancelled articles
    inpaths $NEWSHOST              | mail $PATHSURVEY 
-- 
 (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))