My apologies for such a rudimentary question, but I am attempting to count the number of blank lines in a text file with awk. This is NOT a homework assignment. Windows 10. Gawk 4.1.3
BEGIN { x=0 }
/^$/ { x=x+1 }
END { print "I found " x " blank lines." }
The output is always: I found 0 blank lines.
Thanks.