in Bash, how can i transform below string in an array in Bash:
details="cl roo,dara shi,GD leader, is the man,YG FAMILY"
This is my code:
IFS="[a-z],[a-z]" read -r -a details_list <<< "$details"
Expected output when array is iterated:
cl roo
dara shii
GD leader, is the man
YG FAMILY
Actual Output when array is iterated:
cl roo
dara shii
GD leader
is the man
YG FAMILY