diff --git a/nando-stats b/nando-stats index 01890a7..2b2b258 100755 --- a/nando-stats +++ b/nando-stats @@ -2,10 +2,10 @@ function filesize { awk 'BEGIN{ x = '$1' - split("B KB MB GB TB PB",type) - for(i=5;y < 1;i--) + split("K M G T P",type) + for(i=5;y < 0.1;i--) y = x / (2^(10*i)) - str=int(y*10)/10 + str=int(y*10)/10 type[i+2] if (x==0) { str = "0" } print str }' || return $?