Path: utzoo!attcan!uunet!ginosko!gem.mps.ohio-state.edu!rpi!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: news.admin Subject: inpaths Message-ID: <1989Sep24.072129.17264@rpi.edu> Date: 24 Sep 89 07:21:29 GMT Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 69 In the head of inpaths.c there is the following [abbreviated] comment: /* Run it like this: * * find . -type f -print | inpaths "yourhost" | mail pathsurvey@decwrl.dec.com * * If you have some other way of generating a list of news file * names, such as running a script over the history file, you can use that * instead. Inpaths handles crossposting regardless of which technique * you use. */ Well, I really dislike the idea of sending our diskheads seeking all over the place when it can be avoided, so I wrote a short script, "doinpaths", to handle it. I invoke it from cron on the twenty-third of each month. Two versions are presented here, one for C News and one for B News. It saves quite a bit of resource by avoiding the find; I hope someone else finds it useful. Yes, it is terribly simple -- then again, I have a feeling that a lot of people just look at the comment from inpaths.c and say, "Okay, find . it is ..." Aside to Brian Reid: sorry about the two bogus messages last night. :-) They weren't from the script, but from the cron pipeline I used to have that left out an important step. ----begin C News doinpaths---- #! /bin/sh # A simple script to set up the input for inpaths before running it. # The only thing that probably needs to be changed is this first line # about where to find the config file by default. # 23 Sep 89 -- tale@pawl.rpi.edu # =()<. ${NEWSCONFIG}-@@}>()= . ${NEWSCONFIG-/usenet/bin.server/config} PATH=$NEWSCTL/bin:$NEWSBIN/etc:$NEWSPATH PATHSURVEY=pathsurvey@decwrl.dec.com,$NEWSMASTER NL='\ ' cd $NEWSARTS # Hard tab for cut delimiter cut -f3- "-d " $NEWSCTL/history | # Grab the article names sed -e '/^$/d' -e y:.:/: -e "s/ /$NL/g" | # list pathnames, one per line inpaths `cat $NEWSCTL/server` | mail $PATHSURVEY ----end C News doinpaths---- ----begin B News doinpaths---- #! /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. # 23 Sep 89 -- tale@pawl.rpi.edu PATH=/bin:/usr/bin:/usenet/bin.server/etc NEWSARTS=/usenet/spool NEWSMASTER=/usenet NEWSCTL=/usenet/lib NEWSHOST=rpi PATHSURVEY=pathsurvey@decwrl.dec.com,$NEWSMASTER NL='\ ' cd $NEWSARTS # Hard tab for cut delimiter cut -f3- "-d " $NEWSCTL/history | # Grab the article names sed -e '/^$/d' -e y:.:/: -e "s/ /$NL/g" | # list pathnames, one per line inpaths $NEWSHOST | mail $PATHSURVEY ----end B News doinpaths----