#!/bin/csh -f
###################################
# Look through the recent WWW access logs from the cismm.org machine to find who accessed the
# Image Surfer download.  These logs need to have been copied to
# /afs/cs.unc.edu/project/cismm/web_logs
###################################

cd /afs/cs.unc.edu/project/cismm/web_logs

rm ~/tmp/cismm_optotune_total_list

foreach p (`ls *access_log-*`)
	rm ~/tmp/cismm_optotune_list
	cat $p | grep -E 'Optotune' | tee ~/tmp/cismm_optotune_list
	cat ~/tmp/cismm_optotune_list >>! ~/tmp/cismm_optotune_total_list
end

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

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

