I'm a complete noob when it comes to bash, I extracted some timestamps from an xml file using xmlstarlet however its formatted as a space separated string rather than an array. I need them as an array so that I can use them in a for loop. As far as I can tell you can't do that with xmlstarlet so I need to just convert the string.
I found this thread which says I can use IFS=' ' read -a arr <<< "$line" which works for a basic string but not the one I'm trying to use it with:
If I use the command on this string it only puts the first part in the array so I get 2023-06-19T00:00:00+01:00
I also tried arr=( $line ) which is also suggested in the thread but that does the same thing. Is there another way I can try to convert this, or a way to export from xmlstarlet straight to an array?