commit - 6e6a3f2a743829518a1c44eebff39ba04f3c0446
commit + 9f21d2b944d60d998495ac26bb934456e284c78f
blob - 54bb4f0534b12c1b55913d8864926d481c0224a1
blob + 3cb2248349b3991ce08711f9de6bf54b2ab35b86
--- dfs
+++ dfs
# prints df(1) then the totals of each statistic
# TODO: align the numbers for totals to match df(1) output
set -e
-df -h | grep ^[a-zA-Z/]
+df -h | grep '^[a-zA-Z/]'
df -k | awk '
function human(kb) { order=1; while (kb >= 1000) { kb /= 1024; order++ }; return sprintf("%.1f%c", kb, substr("KMGTPE", order, 1)) }
NR > 1 && /^\/dev/ { devs++; size += $2; used += $3; avail += $4; cap += $5 }