In a Bash script I would like to split a line into pieces and store them in an array.
The line:
Paris, France, Europe
I would like
Use this:
countries='Paris, France, Europe' OIFS="$IFS" IFS=', ' array=($countries) IFS="$OIFS" #${array[1]} == Paris #${array[2]} == France #${array[3]} == Europe