Feb 202012
Split on specific characters on Bash Script's for loop
Answer:
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 '-'
E.g.
# ./test.sh
a
b
c
d
e