bash get count of ech character 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