You can find a decent AWK tutorial
here and manual
here; Perl stuff is almost anywhere and everywhere on the web.
The books "Learning Perl" and the "Perl Cookbook" would be good buys if you choose to learn the language (it even has a special "
format" feature to help pretty print garbage IAW with a report format).
__________________
My
Journal
Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.