Skeleton script to generate status report as html

To begin, cp skeleton xxstat and edit the copy.
# Generic setup - filename of page to generate, its title, and the
# command to run on each box:
FILE="/httpd/htdocs/admin/xx.html"
TITLE="Foo Status"
CMD=foo
echo "<HTML><HEAD><TITLE>$TITLE</TITLE></HEAD><BODY>" > $FILE
#
echo `date` >> $FILE
echo "<hr>" >> $FILE
#
# Do the remote machines - 'boxes' is a text list of all relevant machines
# by name; you can hardcode the names instead -- e.g.
#
# for i in mustang spitfire
#
for i in `cat boxes`
do
 echo "<H4>$i</H4>" >> $FILE
 echo "<pre>"   >> $FILE
 /opt/bin/ssh $i $CMD >> $FILE
 echo "</pre>"  >> $FILE
 echo "<hr>"    >> $FILE
done
# To include the machine on which we are running this script:
 echo "<H4>whorfin</H4>" >> $FILE
 echo "<pre>"    >> $FILE
 $CMD >> $FILE
 echo "</pre>" >> $FILE
 echo "<hr>"   >> $FILE
# All done
echo "</HTML>"  >> $FILE