Tille - I can see you, read those man pages!   Tille's Site

Converting text to Docbook XML

The first problem is the white lines, we have to deal only with the lines containing at least one non-blank character. Say that the input file for awk is called awkinput, then the following command takes out blank lines:

grep -c . awkinput

This reduced input can then be fed into awk:

grep . awkinput | awk 'BEGIN { FS="\t" } { print "<row>\n<entry> $1 \
"</entry>\n<entry>\n" $2 "\n</entry>\n</row> }'
Home
© 1995-2010 Machtelt Garrels - tille - Powered by vIm - Best viewed with your eyes - Validated by W3C - Last update 20100511