tags:

views:

157

answers:

2

Hi,

may i know the tips for debugging any awk script? Please feel free to share if you have any.

Thanks

+3  A: 

Use the print statement in your code to print out values of variables/return values and so on. If you are using gawk, you can use the -W dump-variables[=file] option to dump variables out to a file for debugging. Also, the option -W lint[=value] might be of interest. See the documentation for more. Other version of awk, such as pgawk provides profiling. A page of the sed/awk book on debugging for your reference.

ghostdog74
A: 

Google... my friend!

http://members.ziggo.nl/awater/

xtofl
that tool is last updated 10 years ago as stated on that page. and there are also many limitations.
ghostdog74
... And I was the 36th visitor!
xtofl