[Nottingham] AWK script

Camilo Mesias camilo at mesias.co.uk
Thu Mar 24 16:40:20 UTC 2011


are you confident of Awk's behaviour splitting the file into records
and fields? If you ran a simple script along the lines of

{ print "fields = " NF ; for (i=1; i<NF; i++){ print i " is " $i } }

Does it print what you expect?

If that's working well then the logic of the program looks a bit off,
I think there are too many for loops and most of the second part of
the script wants to be inside the 'if' that checks for the name of the
author... but that could be me misunderstanding the intentions of the


More information about the Nottingham mailing list