Re: wc problem

Jim Meyering <[email protected]> Sat, 14 Jun 2003 10:21:08 +0200
Newsgroups gmane.comp.gnu.textutils.bugs
Message-ID <[email protected]>
Yuval Dinari <[email protected]> wrote:
> (Well, this is not really a bug since the program behaves as specified)
>
> wc -l   counts the number of newlines.  If the the file doesn't end
> with a newline then
> this number is less the the number of lines in the file.
> Wouldn't it be nicer if wc would return the actual number of lines?

It's far too late to change how `wc -l' works.
Many programs rely on the existing behavior, and
POSIX requires it.

The alternative is to add a new option, but I'm not
sure that'd be worthwhile.