Monday, January 30, 2012

Bash script to convert a list in plain text to a web page (HTML)

awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}'  ~/Desktop/test.txt > test.html


http://www.dan.co.jp/cases/javascript/encode_entities.html