tmp I type a single character,but
wc -c shows
Because newlines are characters too. Tell your text editor to not add one at the end of the file. No, I don't know how.
One way is to
To show the count of newline characters found:
Strip the newline character and count characters:
Strip the newline character (and possible returns with
Sorry for the late answer. But I saw this question just now with no right reply.
Use echo -n Hello | wc -m.
This is faster than deleting the newline.