getline advances to next file instead of returning EOF
getline
is specified to read “from the current input file” and to return 0 at the end-of-file. Both gawk and POSIX docs use this verbiage. It makes sense: Data may be divided between files for a reason. The language is more expressive if getline
can distinguish files. Information that is structured enough to warrant getline
usually doesn’t cross file boundaries.