I am trying to capture the elements of a string by splitting it using a delimiterusing a shell script,but I am not able to capture the elements properly if the string has any space among the words between the delimiters
eg:
`var=hello;my name is;john
IFS=';' read -ra data<<< "$var"
a=${data[0]}
b=${data[2]}
c=${data[4]}
echo $a
echo $b
echo $c`
while am able to capture "hello" in 'a' but "my name is " is not being captured in 'b',am I doing anything wrong ?