[bash] How to perform a for loop on each character in a string in Bash?