slight update to fastdu formatting

This commit is contained in:
2018-12-21 13:24:04 +02:00
parent bc9dd12a40
commit ee017c8c55
2 changed files with 5 additions and 7 deletions

View File

@@ -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 $?
}

View File

@@ -6,7 +6,7 @@ Usage: md5sum-update [-r] [list name]
-r recursive
list name is md5sums.txt by default
Check files with "md5sum -m m5sums.txt"
Check files with "md5sum -c m5sums.txt"
'
exit
}