Example. Calculate totals for all filesystems: total Mb, used Mb, free Mb df -k |\ awk '{ a += $2 ; b += $3 ; c += $4 } END { printf("%f %f %f\n", a/1024, b/1024, c/1024); }'
© 2005 tiplib.com