Linux: Why should text files should end with a newline

wc -l will not count a final "line" if it doesn't end with a newline.
Because a file (or stream) of zero lines can be distinguished from a file of one empty line.
https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

浙公网安备 33010602011771号