in reply to df -mb

i dunno what df -h does (since it doesn't seem to exist anywhere except BSD), but i put together a little front end for df -k that will reformat it in MB. it seems to work for solaris, linux and tru64.
use strict; my $args = join(" ", @ARGV); open(D, "df -k $args |") or die "Unable to run df! $!"; my @line = split(" ", <D>); exit unless(defined(@line)); $line[1] = "mbytes"; $line[3] = "avail"; printf "%-20s %7s %7s %7s %8s %s\n", @line; while(@line = split(" ", <D>)) { for(1,2,3) { $line[$_] = $line[$_] >> 10; } printf "%-20s %7s %7s %7s %8s %s\n", @line; } close(D);