Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 beta 5/9/83; site celerity.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcc6!celerity!barto
From: barto@celerity.UUCP (David Barto)
Newsgroups: net.sources
Subject: lbgm logfile validate routine
Message-ID: <242@celerity.UUCP>
Date: Wed, 19-Dec-84 13:59:26 EST
Article-I.D.: celerity.242
Posted: Wed Dec 19 13:59:26 1984
Date-Received: Fri, 21-Dec-84 07:41:55 EST
Distribution: net
Organization: Celerity Computing Inc, San Diego Ca.
Lines: 40

cat > INTRO <'EOF'
This routine will check the contents of the logfile for the lbgm
archive against the contents of the directory.  It reports any
mis-matches.

	This ends with an 'exit' so you can feed it directly to sh.

EOF
cat > lbgm.validate <<'EOF'
#! /bin/sh
ARCHIVE=${LBGMDIR:-/usr/lbgm}
LOGFILE=save.sog
LS=/tmp/ls$$
MISSING=$ARCHIVE/Missing

trap "/bin/rm $LS $MISSING" 1 2 3 9

cd $ARCHIVE

: 'get the list of files'
/bin/ls *_* | grep -v '#' > $LS
: 'get the files from the logfile.'
awk '/^Jan_|^Feb_|^Mar_|^Apr_|^May_|^Jun_|^Jul_|^Aug_|^Sep_|^Oct_|^Nov_|^Dec_/' $LOGFILE | sort | sed -e 's/://' | diff - $LS > $MISSING

if [ -s $MISSING ]
then
	echo "The following files are NOT in the log"
	grep -v '>' $MISSING | sed -e 's/>//' | more
	echo "The following files do NOT have source associated"
	grep -v '<' $MISSING | sed -e 's/