Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-29-2008
danmero danmero is offline Forum Advisor  
 

Join Date: Nov 2007
Location: H3X
Posts: 1,566
This should work:

Code:
awk -v a="<TR><TD" -v b="</TD><TD>" -v c="</TD></TR>" 'BEGIN{print "<html><table>"}/^[0-9]/{print  a$1b$3b$5b$7b$9c}END{print "</table></html>"}' file.txt > file.htm


Last edited by danmero; 10-29-2008 at 06:23 PM..