count amount of characters in variable bash 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