[EMAIL PROTECTED] wrote:
> I have a little question. When I am working with my Terminal and ask him how
> long the word counter is he tells me, oh, the word is longer than it is. For
> example:
> I tell him "foo bar" and I count up to seven characters, you know, he says
> stupiderweise eight, damn it but also... so i wish to question you:
> why is my terminal telling me such things?
> Thank you for question answering

If you did it via `echo foo bar|wc -c', then that's not surprising.
wc is counting the trailing newline byte.  Do this instead:

  echo -n 'foo bar'| wc -c

or this:

  echo 'foo bar' | tr -d '\n' | wc -c

Both print `7'.

_______________________________________________
Bug-textutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-textutils

Reply via email to