count number of characters in a string unix code example
Example: bash count character in variable
$ mystring="one two three four five"
$ echo "string length: ${#mystring}"
string length: 23
$ mystring="one two three four five"
$ echo "string length: ${#mystring}"
string length: 23