bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in 'wc -l'


From: Alfred M. Szmidt
Subject: Re: bug in 'wc -l'
Date: Fri, 6 Feb 2004 13:05:09 +0100 (MET)

   I am sending you a patch to solve a 'problem' at the wc program.
   When used with -l option (to count the number of lines) the last
   line isn't counted.

It counts occurences of '\n' (i.e. newline).  So I guess that the
behaviour is correct.

   The problem is: if the input does not end with a newline "\n", this
   line is not counted.

Well, if it doesn't end with a newline (\n) then it isn't really a
line...

Cheers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]