#!/bin/sh

echo Content-Type: text/html
echo ''

echo '<title>Java Hit Counts</title>'
echo -n 'This page lists the number of hits of various of my Java files, as of '
echo -n `/bin/date`
echo '.'

echo '<p>'

echo "The numbers of hits are given for each of the previous four <strong>weeks</strong> (counted from Sunday 4:25 a.m. to Sunday 4:25 a.m.), and also for the current week (i.e. since the most recent Sunday 4:25 a.m).  They are computed by grepping my machine's log files; hits from my own machine are not counted."

echo '<p>'

echo "In a three-year period within 1998-2001, my tennis and soccer always received <strong>more than 1000 hits each per week</strong>, and usually more than <strong>2000 hits each per week</strong>.  (The weekly records are tennis 3153 hits, soccer 5055 hits.)  This represented a total of well over half a million hits, for those two games during the three-year period.  It must be because of all the <A HREF="/jeff/java/#links">links to my Java pages</A> around the net -- thanks everyone!"

echo "(Of course, since then the hit counts have decreased markedly.)"

# Create shortened files.
( zgrep class /var/log/apache2/access.log.4 | grep -v 128\.100\.73\.51 ) > /tmp/apachelog.$$.4
( zgrep class /var/log/apache2/access.log.3 | grep -v 128\.100\.73\.51 ) > /tmp/apachelog.$$.3
( zgrep class /var/log/apache2/access.log.2 | grep -v 128\.100\.73\.51 ) > /tmp/apachelog.$$.2
( grep class /var/log/apache2/access.log.1 | grep -v 128\.100\.73\.51 ) > /tmp/apachelog.$$.1
( grep class /var/log/apache2/access.log | grep -v 128\.100\.73\.51 ) > /tmp/apachelog.$$

echo '<h3>Games:</h3>'

echo '<ul>'
echo -n '<li><strong>soccer.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c soccer\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c soccer\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c soccer\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c soccer\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c soccer\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>tennismatch.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c tennismatch\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c tennismatch\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c tennismatch\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c tennismatch\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c tennismatch\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>spacetag.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c spacetag\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c spacetag\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c spacetag\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c spacetag\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c spacetag\.class`
echo ''
echo '</ul>'

echo '<h3>Science Simulations:</h3>'

echo '<ul>'
echo -n '<li><strong>manymoons.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c manymoons\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c manymoons\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c manymoons\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c manymoons\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c manymoons\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>evolution.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c evolution\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c evolution\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c evolution\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c evolution\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c evolution\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>gambler.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c gambler\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c gambler\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c gambler\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c gambler\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c gambler\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>buckets.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c buckets\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c buckets\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c buckets\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c buckets\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c buckets\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>uncunx.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c uncunx\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c uncunx\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c uncunx\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c uncunx\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c uncunx\.class`
echo ''

echo '</ul>'

echo '<h3>Markov Chain Monte Carlo Simulations:</h3>'

echo '<ul>'
echo -n '<li><strong>exp.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c exp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c exp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c exp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c exp\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c exp\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>unif.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c unif\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c unif\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c unif\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c unif\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c unif\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>slice.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c slice\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c slice\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c slice\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c slice\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c slice\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>cftp.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c cftp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c cftp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c cftp\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c cftp\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c cftp\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>adapt.class:</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c adapt\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c adapt\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c adapt\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c adapt\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c adapt\.class`
echo ''

echo '</ul>'

echo '<h3>Dr. J Cartoon Series:</h3>'

echo '<ul>'
echo -n '<li><strong>intro.class (Dr. J #1):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c intro\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c intro\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c intro\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c intro\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c intro\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>first.class (Dr. J #2):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c first\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c first\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c first\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c first\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c first\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>ingr.class (Dr. J #3):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c ingr\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c ingr\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c ingr\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c ingr\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c ingr\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>legend.class (Dr. J #4):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c legend\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c legend\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c legend\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c legend\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c legend\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>ups.class (Dr. J #5):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c ups\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c ups\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c ups\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c ups\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c ups\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>voyage.class (Dr. J #6):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c voyage\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c voyage\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c voyage\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c voyage\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c voyage\.class`
echo ''

echo '<br><br>'
echo -n '<li><strong>office.class (Dr. J #7):</strong> '
echo -n `cat /tmp/apachelog.$$.4 | grep -c office\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.3 | grep -c office\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.2 | grep -c office\.class`
echo -n ', '
echo -n `cat /tmp/apachelog.$$.1 | grep -c office\.class`
echo -n '; current week '
echo -n `cat /tmp/apachelog.$$ | grep -c office\.class`
echo ''
echo '</ul>'

rm /tmp/apachelog.$$.4 /tmp/apachelog.$$.3 /tmp/apachelog.$$.2 /tmp/apachelog.$$.1 /tmp/apachelog.$$


echo '<hr><hr>'
echo '[<A HREF="/jeff/java/">Return to my Java Page</A> / <A
HREF="/jeff/">Home Page</A> / <A
HREF="/jeff/contact.html">Contact me</A>]'

