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!decvax!ittvax!dcdwest!sdcsvax!sdcc6!celerity!barto From: barto@celerity.UUCP (David Barto) Newsgroups: net.sources Subject: lbgm toc awk script Message-ID: <248@celerity.UUCP> Date: Fri, 28-Dec-84 17:59:33 EST Article-I.D.: celerity.248 Posted: Fri Dec 28 17:59:33 1984 Date-Received: Sat, 29-Dec-84 03:34:52 EST Distribution: net Organization: Celerity Computing Inc, San Diego Ca. Lines: 42 : 'use sh not csh' cat > README <<'ENDOFREADME' This is a simple program which will show the filename and the subject line. Ends with "End of Distribution" has exit 0 for the signature..... Hea - it ain't great, but it works. ENDOFREADME cat > lbgmtoc <<'ENDOFlbgmtoc' #! /bin/sh : 'archdir [ARCHIVE [LOGFILE]] * use this to print out a simple table of contents for the * lbgm archive' ARCHIVE=/user/lbgm LOGFILE=save.log case $# in 1) ARCHIVE=$1 ;; 2) ARCHIVE=$1 LOGFILE=$2 ;; *) echo "Usage: $0 [ARCHIVE [LOGFILE]]" 2>&1 exit 1 ;; esac cd $ARCHIVE awk 'BEGIN { file="" } /^Jan_|^Feb_|^Mar_|^Apr_|^May_|^Jun_/ {file = $0} /^Jul_|^Aug_|^Sep_|^Oct_|^Nov_|^Dec_/ {file = $0} /^ Subject/ {print file $0}' $LOGFILE ENDOFlbgmtoc echo "End of Distribution" exit 0 -- David Barto akgua!celerity!barto {decvax || ucbvax || ihnp4}!sdcsvax!celerity!barto "If you are using more than 7 sites to get here, you are taking the long way"