Shell Script for HTML Transfer statistics

#!/bin/sh
# Create an HTML file listing all non-GIF files
# fetched by WWW clients from my public_html tree.
# [29-Aug-1995]

HTTPHOME=/home/httpd/htdocs
NUMBER=25

PROGRAM='
BEGIN{
	print "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 3.0//EN\" >"
	print "<!-- Last update: " DATE " -->"
	print "<HTML>"
	print "<HEAD>"
	print "<TITLE>"
	print "HTML Transfer Statistics for Home Pages of Jeffrey Gold"
	print "</TITLE>"
	print "<LINK REV=\"made\" HREF=\"mailto:" USER "@" HOST "\">"
	print "</HEAD>"
	print "<BODY BACKGROUND=\"gif/slate.gif\" BGCOLOR=\"\#808080\" TEXT=\"\#FFFFFF\" ALINK=\"\#0000FF\" LINK=\"\#aaccff\" VLINK=\"\#6699ff\">"
	print "<BLOCKQUOTE>"
	print "<CENTER>"
	print "<H2>"
	print " HTML Transfer statistics"
	print "</H2>"
	print "</CENTER>"
	print "<PRE>"
	print "%Reqs %Byte  Bytes Sent  Requests   Archive Section"
	print "----- ----- ------------ -------- |------------------------------------"
	print "</PRE>"
	print "<PRE>"
}
{ print }
END {
	print "</PRE>"
	print "Last updated: " DATE
        print "<P><font size=\"-1\">Thanks to...</font></P>"
	print "</BLOCKQUOTE>"
	print "</BODY>"
	print "</HTML>"
}'

grep -i '~'$USER $HTTPHOME/wwwstats.html | \
	sort +3nr -4 | \
	grep -v '.gif$' | \
	head -$NUMBER | \
	/usr/local/bin/gawk -v USER=$USER -v HOST=$HOST -v DATE="`date`" "$PROGRAM"