Path: utzoo!utgpu!water!watmath!clyde!rutgers!uwvax!oddjob!hao!ames!nrl-cmf!mailrus!umix!uunet!ccicpg!turnkey!conexch!root From: root@conexch.UUCP (Larry Dighera) Newsgroups: news.admin Subject: Re: Unpacking and storing the Maps Message-ID: <197@conexch.UUCP> Date: 19 Feb 88 18:05:49 GMT References: <494@wa3wbu.UUCP> Reply-To: root@conexch.UUCP (Larry Dighera) Organization: The Consultants' Exchange, Orange County, CA. (714) 842-6348 Lines: 66 In article <494@wa3wbu.UUCP> john@wa3wbu.UUCP (John Gayman) writes: > > Can anyone recommend a script/program to capture & store the USENET >maps as they come across from News ? Having to go through and manually >save and unshar each one takes an eternity. Also, Im not real familiar Here is a copy of the shell script that I use to keep the maps up to date. It makes the presumption that the later articles superceed older ones. Parsing the Superceeds line is left as an exercise for the reader :-). It runs interactively, and asks for conformation before overwriting old maps. : # # This script will assist in keeping the UUCP maps up to date. # It assumes that you keep your maps compressed in their own # subdirectory and that later article numbers superseed eariler # map-articles. # # Copyright Dighera Data Services Sat Jan 9 09:02:27 PST 1988 # MAPDIR=/root/Maps # This is where the UUCP maps reside NEWSDIR=/usenet/usenet/spool/news/comp/mail/maps # Raw maps here export MAPDIR NEWSDIR cd $NEWSDIR set `ls` if [ $# -gt 0 ] then cp * $MAPDIR && rm * else echo "$0: No new maps to process" exit fi cd $MAPDIR for I do sed '1,11d' $I > $0.tmp && (rm $I; sh $0.tmp) done rm $0.tmp for i in `ls *[!Z]` do if [ -f ${i}.Z ] then echo "Over write: \n `ls -log ${i}.Z`" echo "With: \n `ls -log $i` ?" read CHOICE case $CHOICE in [yY]*) rm ${i}.Z; compress $i; ls -log ${i}.Z;echo;; *) continue;; esac else compress $i fi done ====================== end of code ============================= -- USPS: The Consultants' Exchange, PO Box 12100, Santa Ana, CA 92712 TELE: (714) 842-6348: BBS (N81); (714) 842-5851: Xenix guest account (E71) UUCP: conexch Any ACU 2400 17148425851 ogin:-""-ogin:-""-ogin: nuucp UUCP: ...!ucbvax!ucivax!mickey!conexch!root || ...!trwrb!ucla-an!conexch!root