#!/bin/sh - PATH=/l/web/bin:$PATH; export PATH atally=/l/web/logs/access_tally ptally=/l/web/logs/plexus_tally ftally=/l/web/logs/ftp_tally # mkhits - regenerate my personal Web hits report # Steve Kinzler, kinzler@cs.indiana.edu, Nov 96 # http://www.cs.indiana.edu/~kinzler/home.html#hyplan outfile="$HOME/.hyplan/stats/hits.html" case "$1" in '') uptodate=`find "$outfile" -newer "$atally" -newer "$ptally" \ -newer "$ftally" -print 2>&1` || exit 3 case "$uptodate" in ?*) exit 0;; esac;; -f) ;; *) echo "usage: $0 [ -f ]" 1>&2; exit 1;; esac tmp=/tmp/mh$$ trap "rm -f $tmp; exit" 0 1 2 13 15 (cat << EOF; echo '') > $tmp || exit 2 Steve Kinzler - Hit Report

Steve Kinzler's Hit Report

EOF (perl -ne 'print if /kinzler/i && ! m,/work([/\s]|$),' "$atally" | merge_tally -e perl -ne 'print if /kinzler/i' "$ptally" | merge_tally -x) | perl -ane 'print if $F[0] ne $F[1]' | summ_tally -all -html >> $tmp (echo ''; cat << EOF) >> $tmp

This document is generated periodically with mkhits.

<kinzler@cs.indiana.edu>
EOF cat < $tmp > "$outfile"