tag 9449 notabug
thanks

On 09/06/2011 07:49 AM, Laurent TARRISSE wrote:
echo toto | wc --chars
5

Thanks for the report; however, this is correct. wc is counting the newline output by echo.

Try these to see the difference:

$ printf toto | wc --chars
4
$ echo toto | od -tx1z

Why does 'wc' add one character ?

It doesn't.  Echo does.

--
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



Reply via email to