Why does wc increase character count by 1 ?

Manish Jain bourne.identity at hotmail.com
Sat Sep 9 18:10:44 UTC 2017


echo "abc 123" | wc -c

I would expect wc to output 7, but actually I get 8.

Indeed, I see similar behaviour with 'echo | wc -c'
This should produce 0, but I get 1

What might be the problem ? Thanks for any tips.
Manish Jain

More information about the freebsd-questions mailing list