diff --git a/scripts/network_bandwidth.sh b/scripts/network_bandwidth.sh index b381e24..bad4138 100755 --- a/scripts/network_bandwidth.sh +++ b/scripts/network_bandwidth.sh @@ -85,7 +85,7 @@ bandwidth_to_unit() { local result="0.00" if (($1 != 0)); then - result="$(bc <<<"scale=2; $1 / $size")" + result="$(awk -v a="$1" -v b="$size" 'BEGIN { printf "%.2f\n", a / b }' /dev/null - then - echo "command bc could not be found!" - exit 1 - fi - while true; do if ((counter == 0)); then counter=60