how to split string to an array in bash code example
Example 1: split string and create array bash
my_array=($(echo $string | tr "," "\n"))
Example 2: split string and create array bash
IFS=', ' read -r -a array <<< "$string"
Example 3: split bash string
IN="[email protected];[email protected]"
arrIN=(${IN//;/ })