#!/bin/csh
#  text2html
#    Convert a (text) file to preformatted html & put results on std out

if ("$1" == "" || "$2" != "") then
  echo "usage: $0 <file> | "
  echo "  converts <file> to preformatted xml"
  exit
endif

echo "<html>" 
echo "<body><pre>" 
#cat $1 | sed "s^<^\&lt;^g" | sed "s^&^\&amp;^g" | sed "s^&amp;lt;^\&lt;^g"
cat $1 | sed "s^&^\&amp;^g" | sed "s^<^\&lt;^g"
echo "</pre></body>"
echo "</html>"

