Number of characters in my file (without end_of_line/return characters)

I have some problem with the wc command.
If I write just 3 characters in a file, wc -m give to me 4 characters instead of 3.
For example :
[pene@donunix] echo 123 | wc -m
4

To explain quickly this, wc add the "end of line" character. So, if I don't want it for my echo 123, I have to write this :
[pene@donunix] echo -e "123\c" | wc -m

And if I want to exclude all the end_of_line/return characters of my wc -c, I have to write this wonderful command :
[pene@donunix] cat fic.txt | xargs -i% echo -e "%\c" | wc -c

No comments: