[Top][All Lists]
[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.
- bug in 'wc -l', Thobias Salazar Trevisan, 2004/02/06
- Re: bug in 'wc -l',
Alfred M. Szmidt <=