#!/usr/bin/perl # df parser by ArZa , distributed freely and without any warranty, licensed under GPL3 for (split /\n/, `LANG=en /bin/df --total -hP @ARGV|grep -vE '( /dev| /run|init)'`){ # do for every line of df output my @col=split; # words/columns printf "%- 25s", shift(@col); # print the filesystem left-aligned for (@col[0..3]) { s/\.0//; printf "% 5s ", $_; } # print the rest right-aligned print "$col[4]\n"; # except the mountpoint }