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
标签:files,end,text,newline,should,file From: https://www.cnblogs.com/dissipate/p/16748184.html