Probably a silly question, but is there a reason to put it all in a variable just to echo it all out again?
Also, df has the -h option to make human readable which nullifies the need for all the math.
So you could have just done:
Code:
df -Plh | awk 'BEGIN{print strftime();print "MP TOTAL USED\n-- ----- ----"}/^\/dev/{print $6,$2,$4}'
I would also probably prefer to use printf to get the spacing nicer too.
oh ... and I had no idea why the sed is even there??