#!/bin/csh -f
###################################
# Look through the recent WWW access logs to find who accessed the
# Video Spot Tracker download page.
###################################

cd /net/www/var/log/httpd

rm ~/tmp/spot_total_list

foreach p (`ls access_log.*.gz`)
	rm ~/tmp/spot_list
	gunzip < $p | grep '/cismm/download/spottracker/video_spot_tracker_v' | grep -v 152.2. | tee ~/tmp/spot_list
	cat ~/tmp/spot_list >>! ~/tmp/spot_total_list
end

echo "Total number of unique off-site hits:"
cut -f1 -d" " ~/tmp/spot_total_list | sort | uniq | wc

echo "Total number of weeks:"
echo `ls access_log.*.gz` | wc

echo "Months covered:"
cut -f2 -d"/" ~/tmp/spot_total_list | sort | uniq

