fix: count int MiB
This commit is contained in:
parent
316cbaae09
commit
6e2cf9214e
@ -19,8 +19,8 @@ cntud="$(echo "$out" | grep -e "Up & Down" | wc -l)"
|
||||
cntd="$(expr $ctnd + $cntud)"
|
||||
cntu="$(expr $cntu + $cntud)"
|
||||
infos="$(echo "$out"| tail -n1)"
|
||||
spdd="$(echo "$infos" | awk -F " " '{ printf "%.2f", $5/1000 }')"
|
||||
spdu="$(echo "$infos" | awk -F " " '{ printf "%.2f", $4/1000 }')"
|
||||
spdd="$(echo "$infos" | awk -F " " '{ printf "%.2f", $5/1024 }')"
|
||||
spdu="$(echo "$infos" | awk -F " " '{ printf "%.2f", $4/1024 }')"
|
||||
[ 0 -ne $cntd ] && down="$(printf "%s(%sM)" "$cntd" "$spdd")" || down="---"
|
||||
[ 0 -ne $cntu ] && up="$(printf "%s(%sM)" "$cntu" "$spdu")" || up="---"
|
||||
|
||||
|
Reference in New Issue
Block a user