head 1.1; branch 1.1.1; access ; symbols start:1.1.1.1 markom:1.1.1; locks ; strict; comment @# @; 1.1 date 2002.01.16.10.24.50; author markom; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.01.16.10.24.50; author markom; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @#!/bin/nawk # cleans up any leading crap before line in stream from tk2html /^<TITLE>/ { go = 1 } /^<table>*/ { getline ln numf = split (ln, spln) if ( ln !~ "Name: *" ) { ind = 0 inc = 4 print "<table cellpadding=5>" while ( ln !~ "^</table>" ) { for (i = 1; i <= numf; i++) { tablns[ind] = spln[i] ind++ } getline ln numf = split (ln, spln) } for (i = 0; i < inc; i++) { print "<td valign=top>" for (j = i; j < ind; j += inc) print tablns[j] "<br>" print "</td>" } print "</table>" } else { print "<pre>" while ( ln !~ "^</table>" ) { print ln getline ln } print "</pre>" } next } go == 1 { print $0 } @ 1.1.1.1 log @Insight @ text @@