I'm having difficulty extracting the Filesystem and Mounted on columns from the df ouput.
$df -Hl
Results in
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk1 250G 226G 24G 91% 1576021 4293391258 0% /
localhost:/BJeZ62GypQBU7sxaZg0qP6 250G 250G 0B 100% 0 0 100% /Volumes/MobileBackups
/dev/disk2s1 16G 4.7G 11G 30% 0 0 100% /Volumes/NO NAME
/dev/disk3s1 15G 8.0G 7.5G 52% 0 0 100% /Volumes/FLASH DRIVE
Adding column selection
df -Hl | awk '{ print $1"\t"$9 }'
results in
Filesystem Mounted
/dev/disk1 /
localhost:/BJeZ62GypQBU7sxaZg0qP6 /Volumes/MobileBackups
/dev/disk2s1 /Volumes/NO
/dev/disk3s1 /Volumes/FLASH
My Mounted on column has spaces in the file name which is throwing off results. (ie I get "NO" instead of "NO NAME") How do I get the columns to include the entire mount name?