Fixes to calc_bytes unit detection

This commit is contained in:
Julien Pervillé 2017-02-23 10:28:16 +01:00 committed by Timo Derstappen
parent cefcd95a5a
commit d4ddae11d3

View file

@ -27,7 +27,7 @@ function calc_bytes {
UNIT=$2
case "$UNIT" in
KB)
kB)
echo $NUM | awk '{ print $1 * 1024 }'
;;
MB)
@ -36,6 +36,9 @@ function calc_bytes {
GB)
echo $NUM | awk '{ print $1 * 1024 * 1024 * 1024 }'
;;
TB)
echo $NUM | awk '{ print $1 * 1024 * 1024 * 1024 * 1024 }'
;;
esac
}