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

cd /net/www/var/log/httpd

rm ~/tmp/opt_total_list

foreach p (`ls access_log.*.gz`)
	rm ~/tmp/opt_list
	gunzip < $p | grep '/cismm/download/cismm_videooptimizer/cismm_video_optimizer_' | grep -v 152.2. | tee ~/tmp/opt_list
	cat ~/tmp/opt_list >>! ~/tmp/opt_total_list
end

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

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

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

