#!/bin/csh -f
###################################
# Look through the recent WWW access logs to find who accessed the
# 1D Edge Detector download page.
###################################

cd /net/www/var/log/httpd

rm ~/tmp/edge_1D_total_list

foreach p (`ls access_log.*.gz`)
	rm ~/tmp/edge_1D_list
	gunzip < $p | grep 'cismm/download/edgedetector/edge_detector_1d_v' | grep -v 152.2. | tee ~/tmp/edge_1D_list
	cat ~/tmp/edge_1D_list >>! ~/tmp/edge_1D_total_list
end

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

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

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

