Split on specific characters on Bash Script's for loop
If you want to Bash script's for loop to split on non white-space characters, you can change the IFS, e.g.
#!/bin/bash IFS='-' list="a-b-c-d-e" for c in $list; do echo $c done
The above script will split on the character '-'
# ./test.sh a b c d e