DfLine=$(df -h /misc/backup | tail -1)
# convert DfLine into a bash array...
DfLine=(${DfLine// / })
echo -n ${DfLine[3]}
echo " free space remaining on /misc/backup"
So basically I did a perl split on whitespace
and stuffed the results into an array. Actually I'm think
that's a split on " *", not whitespace as I
suspect it
wouldn't work on tabs. I didn't test that though.
Also I think it should be possible to do the command
substitution and the expansion of $DfLine in
one go but all
the $({$({${{ started to make my head hurt so I
stopped there.
Inspiration from this unix.com page.
This is probably a pretty good indication that it's time to re-write the script in perl.
FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.
Keep up with the latest Advogato features by reading the Advogato status blog.
If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!