> 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.
If that's your definition of a line, obviously. However, the poster
is probably right that the last line of a file should count as a
line even if it lacks a final newline.
I was quoting the manual; `wc -l' counts how many times it hits a
`newline' (\n). Not `lines' per see (since that is hard to define
exactly).
,----[ (coreutils)wc invocation ]
| `-l'
| `--lines'
| Print only the newline counts.
`----
Cheers!
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils