slight update to fastdu formatting
This commit is contained in:
10
files/fastdu
10
files/fastdu
@@ -24,9 +24,8 @@ function filesize() {
|
||||
split("B kB MB GB TB PB EB ZB", type)
|
||||
for(i=7;y < 1;i--)
|
||||
y = x / (2^(10*i))
|
||||
str=int(y*10)/10 type[i+2]
|
||||
if (i==-1) { str = x "~B" }
|
||||
print str
|
||||
if (i==-1) { printf( "%d~B", x) }
|
||||
if (i>-1) { printf( "%0.1f%s", y, type[i+2]) }
|
||||
}' || return $?
|
||||
}
|
||||
function siprefix() {
|
||||
@@ -41,9 +40,8 @@ function siprefix() {
|
||||
split("# k# M# G# T# P# E# Z#",type)
|
||||
for(i=7;y < 1;i--)
|
||||
y = x / (10^(3*i))
|
||||
str=int(y*10)/10 type[i+2]
|
||||
if (i==-1) { str = x "~#" }
|
||||
print str
|
||||
if (i==-1) { printf( "%d~#", x) }
|
||||
if (i>-1) { printf( "%0.1f%s", y, type[i+2]) }
|
||||
}' || return $?
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user