Newsgroup archiving - "lbgm" - IMPORTANT FIX

sources-request at genrad.UUCP sources-request at genrad.UUCP
Fri Dec 14 00:30:17 AEST 1984


From: z at 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 at 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



More information about the Mod.sources mailing list