If a file has no newline at the end of the last line, the last line
doesn't get counted. As a minimal test case, try
% echo foo >test && echo -n bar >>test && wc -l test
1
Actually, you can even see it in a smaller case:
% echo -n foo >test && wc -l test
But as an edge case, this one is actually slightly less likely to make
people mad! I could almost see an argument for "0" being the right
answer here; nevertheless, the first example seems clearly wrong to me.
~d
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils