zl程序教程

您现在的位置是:首页 >  系统

当前栏目

Linux: Why should text files should end with a newline

Linux with Text Files end why should
2023-09-11 14:16:15 时间

 

 

 

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