eBookReaderSwitch/mupdf/scripts/find-blanks.awk

7 lines
278 B
Awk
Raw Normal View History

BEGIN { last_char = "x"; }
/^$/ { if (last_char == "{") print(FILENAME, FNR); last_char = " "; next; }
/^\s*{$/ { last_char = "{"; next; }
/ {$/ { last_char = "{"; next; }
/^\s*}$/ { if (last_char == " ") print(FILENAME, FNR); last_char = "}"; next; }
{ last_char = "x"; }