Hi I'm trying to learn bash scripting and I just want to get the character count of a variable. I tried to do it using these two different methods, but I can't understand why I get a difference of one character? Thanks for the help.
chars="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
echo ${#chars}
echo $(echo "$chars" | wc -c)
26
27