how to use split function on strings with a bash script code example
Example 1: split string and create array bash
my_array=($(echo $string | tr "," "\n"))
Example 2: split bash string
IN="[email protected];[email protected]"
arrIN=(${IN//;/ })
my_array=($(echo $string | tr "," "\n"))
IN="[email protected];[email protected]"
arrIN=(${IN//;/ })