## tr2html #........ convert troff (ms) files to HTML 2.0 with unroff # usage: tr2html file.troff file.html" # set oldpath = "$path" set oldmanpath = "$MANPATH" setenv UNROFF_DIR /ul/S/unroff-1.0 setenv MANPATH "$MANPATH"":{$UNROFF_DIR}/doc" #..... inform the user: echo "" echo " unroff is in $UNROFF_DIR , bin on path" echo " man pages: unroff unroff-html unroff-html-ms" echo " (paths will be restored after execution)" echo " usage: tr2html file.troff file.html" echo "" set trfn = "$1" set htmlfn = "$2" if( "$1" == "" ) then echo -n " --- enter troff filename (input): " set trfn = $< endif if( "$2" == "" ) then echo -n " --- enter html filename (output): " set htmlfn = $< endif $UNROFF_DIR/bin/unroff $trfn > $htmlfn if( $? == "0" ) then echo " .... restoring paths ...." set path = "$oldpath" setenv MANPATH $oldmanpath unsetenv UNROFF_DIR endif