I think you can leave out the BEGIN {a=0} because a is incremented in the main program so it is automatically assumed to be an integer which defaults to value 0. Of course you need to print a+0 in the END part on the off chance that no input line has a 1 in fields 3 and 21, otherwise a is assumed to be an empty string.
Also you can leave out most of the spaces and quotes around the comma aren't necessary.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.