I'm having trouble using the IFS to convert my string into an array. Here is what I have as my string:
"Jun01 Jun02 Jun03 Jun04 Jun05 ..." #in that format, separated by spaces
And here is the code I have tried:
IFS=" " #set it to space character
DATES_ARRAY=($DATES_STRING) #from above
echo ${DATES_ARRAY[0]} #output is empty
However when I remove the IFS line it works. But I used a few lines to print out its default ASCII value and I got '32' which means 'Space' character. Being an OCD programmer I'd like to set it myself just to be safe... I don't know how it's going to be preset a priori!
So why does trying to set IFS to Space manually not work?