Iterating over a string

Basic types / Strings

strV="level"

#${#strV} is the length, ${strV:i:1} is the character at index i
for ((i = 0; i < ${#strV}; i++)); do
    echo "strV[$i] = \"${strV:i:1}\""
done
#strV[0] = "l"
#strV[1] = "e"
#...

#grep -o prints every match on its own line, . is any one character
grep -o . <<< "$strV"
#l
#e
#v
#e
#l