I'm parsing some mac OSX log files, and have come across the output of the df -h command, which I now need to split. The line looks like:
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
Now I can't just split on the space character, as there's a space in
Mounted on, but I need to split this into the nine fields.
I've tried using \s{2,} to split only on multiple spaces, but then there are single spaces between the Avail and Capacity fields, so I'm bit lost as to how to handle this.
Any suggestions would be greatly appreciated.