#! /bin/csh -f set usage = "$0 [ -bgcolor BG ] [ -fgcolor FG ] [ -title TITLE ] [ -date DT] < IN.txt > OUT.html " set bgcolor = "#ffffff" set fgcolor = "#000000" set date = "" set title = "No Title" while ( ( $#argv >= 1 ) && ( "x$1" =~ x-* ) ) if ( ( $#argv >= 2 ) && ( "x$1" == "x-bgcolor" ) ) then set bgcolor = "$2"; shift; shift; else if ( ( $#argv >= 2 ) && ( "x$1" == "x-fgcolor" ) ) then set fgcolor = "$2"; shift; shift; else if ( ( $#argv >= 2 ) && ( "x$1" == "x-title" ) ) then set title = "$2"; shift; shift; else if ( ( $#argv >= 2 ) && ( "x$1" == "x-date" ) ) then set date = "$2"; shift; shift; else echo "unknown option $1"; echo "usage: ${usage}"; exit 1 endif end if ( $#argv != 0 ) then echo "excess arguments"; echo "usage: ${usage}"; exit 1 endif /bin/cat < ${title} EOF if ( "x${date}" != "x" ) then echo "${date}" echo " " endif if ( "x${title}" != "xNo Title" ) then echo "

${title}

" endif /bin/cat <
EOF
/bin/cat | /bin/sed -e 's/>/\>/g' -e 's/


EOF