I am writing a program on the pi using wc -m command to count the amount of letters in a string, however, it counts the letters but adds one extra. This is what I currently have.
echo "enter a word"
read var1
echo $var1 | wc -c
When I enter the word, it successfully does something, however, for example if I enter "test" it will output 5. Why is it doing this and is there a fix? Thanks