Bash: Split string into character array

Try

echo "abcdefg" | fold -w1

Edit: Added a more elegant solution suggested in comments.

echo "abcdefg" | grep -o .

Leave a Comment