Fixes to calc_bytes unit detection
This commit is contained in:
parent
cefcd95a5a
commit
d4ddae11d3
1 changed files with 4 additions and 1 deletions
|
@ -27,7 +27,7 @@ function calc_bytes {
|
||||||
UNIT=$2
|
UNIT=$2
|
||||||
|
|
||||||
case "$UNIT" in
|
case "$UNIT" in
|
||||||
KB)
|
kB)
|
||||||
echo $NUM | awk '{ print $1 * 1024 }'
|
echo $NUM | awk '{ print $1 * 1024 }'
|
||||||
;;
|
;;
|
||||||
MB)
|
MB)
|
||||||
|
@ -36,6 +36,9 @@ function calc_bytes {
|
||||||
GB)
|
GB)
|
||||||
echo $NUM | awk '{ print $1 * 1024 * 1024 * 1024 }'
|
echo $NUM | awk '{ print $1 * 1024 * 1024 * 1024 }'
|
||||||
;;
|
;;
|
||||||
|
TB)
|
||||||
|
echo $NUM | awk '{ print $1 * 1024 * 1024 * 1024 * 1024 }'
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue