bug#9019: wc -l bug

2011-07-10 Thread L. A. Walsh
Andrey Sheyko wrote: Hello! I've found out that wc -l doen't count the last line if there is no CR in the end of line It's the 'CR' (or NL) at the end of the line that makes it a "new line"... without that, you just have text appended to the end of the file...

bug#9019: wc -l bug

2011-07-07 Thread Eric Blake
tag 9019 notabug thanks On 07/07/2011 02:31 AM, Andrey Sheyko wrote: > Hello! > I've found out that wc -l doen't count the last line if there is no CR in the > end of line Thanks for the report. However, this is not a bug, but a requirement of POSIX. Furthermore, I think you meant NL, not CR.

bug#9019: wc -l bug

2011-07-07 Thread Davide Brini
On Thu, 7 Jul 2011 12:31:16 +0400 Andrey Sheyko wrote: > Hello! > I've found out that wc -l doen't count the last line if there is no CR in > the end of line That is correct. The description for -l says: -l Write to the standard output the number of characters in each input file. Also