On 2026-10-28 04:16, Pádraig Brady wrote:
Note one could preprocess files to ensure they're a POSIX defined text file (trailing newline) with something like:ensure_text() { sed '$a\'; }
Or, if you merely want to add 1 to wc's count when the file ends in a non-newline, you can use:
grep -c '^'
