Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/3/84; site genrad.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!sources-request
From: sources-request@genrad.UUCP
Newsgroups: mod.sources
Subject: Newsgroup archiving - "lbgm" - IMPORTANT FIX
Message-ID: <530@genrad.UUCP>
Date: Thu, 13-Dec-84 09:30:17 EST
Article-I.D.: genrad.530
Posted: Thu Dec 13 09:30:17 1984
Date-Received: Fri, 14-Dec-84 07:28:33 EST
Sender: john@genrad.UUCP
Organization: GenRad, Inc., Bolton, Mass.
Lines: 57
Approved: john@genrad.UUCP

From: z@rocksvax (Jim Ziobro)

	There was a slight problem with the archive cleaning scripts I
posted a while back.  If the article wasn't present in the archive
the 'save.log' file was wiped out.  The fix was simple so here is
the lbgmX file again.  Hope I save you the trouble I had!

	If you archive other newsgroups you will have to change the
script slightly.  Probably use something like:
lbgmdir=${LBGMDIR-/util/lbgm}

//Z\\
James M. Ziobro
Ziobro.Henr@Xerox.ARPA
{rochester,amd,sunybcs,allegra}!rocksvax!z
-----
lbgmX
-----
: lbgmX - X file with a message-id of $1 from a lbgm archive
: "HISTORY"
: " 11-Dec-84  z at XEROX Henrietta "
:	" Added test to check if article is not in archive. "
:	" Without test the archive save.log was wiped out if article was not present. "
:
: " 06-Sep-84  z at XEROX Henrietta "
:	" Created by Jim Ziobro "
:
lbgmdir=/util/lbgm
cd $lbgmdir

: get filename from Message-Id
filenam=`awk  'BEGIN { filid = "" ; FS = ":" }\
\
	{\
	if ( filid == "" ) filid = $1 ;\
	if ( $0 ~ /^[	 ]*$/ ) filid = "" ;
	# line following blank has filename
	}\
\
\
/^	[Mm][eE][sS][sS][aA][gG][eE]-[Ii][Dd]:/	{\
	if ( $2 == "'"$1"'" )\
	print filid ;\
	}\
	' < save.log `

: "$filenam is filename to be purged from lbgm archive"
: X the files
if test \'$filenam\' != \'\' > /dev/null
then
X *save.log
sed -e /$filenam"/,/^	$/d" < \#save.log > save.log
X $filenam
else
echo No such article as $1
fi