convertp.sh

 

#
###
### convertp.sh
###
### Usage:  convertp.sh filename
###
### Mark up text file w/HTML tags
### Black background


file=`basename $1 .txt`
echo $file
echo "<html>" > $file.html
echo "<head><title>$file</title>" >> $file.html
echo "<meta content=text/css http-equiv=Content-Style-Type>" >> $file.html
echo "<link href=\"http://www.skywayradio.com/white.css\" rel=stylesheet type=text/css>" >> $file.html 
echo "</head>" >> $file.html
echo "<body>" >> $file.html
echo "<h2>$file</h2>" >> $file.html
echo "<font class=grey2>" >> $file.html
echo "<p>&nbsp;</p>" >> $file.html
echo "<pre>" >> $file.html
cat $1 | sed "s/\&/\&amp/g" | sed "s/</\&lt;/g" >> $file.html
echo "</pre>" >> $file.html
echo "</body>" >> $file.html
echo "</html>" >> $file.html