#!/bin/bash # produces a crude HTML table from a tabular file (given on stdin) with columns separated by ":" # usage: tab2html < inbut.txt > output.html awk $* -- ' BEGIN { FS=":" # field-separator: which character separats fields in a record (i.e. in a line) print "" print "" print " " print " " print " Tabular Data" print " " print " " print "
" print " " } { print " " for (i = 1; i <= NF; i++) { print " " } print " " } END { print "
"$i"
" print "
" print " " print "" } '