From d638d14a415f1d05f7d2e2efa410556eb575fd90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Manuel=20Febrer=20Cort=C3=A9s?= Date: Tue, 14 Mar 2017 11:07:50 +0100 Subject: [PATCH] Update multibandwidth Correction of a bug with spaces when there was an output of more than 2 digits --- plugins/network/multibandwidth | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/network/multibandwidth b/plugins/network/multibandwidth index 9f6b57c3..3f48cd4b 100644 --- a/plugins/network/multibandwidth +++ b/plugins/network/multibandwidth @@ -91,7 +91,7 @@ for host in $hosts; do #bing output example: host: 4.592Mbps 0.223ms 0.217773us/bit bing localhost "$host" -n -c 1 -e "$samples" -s "$small_packet_size" -S "$big_packet_size" 2>/dev/null \ | grep -E "bit$" \ - | cut -d " " -f3 \ + | awk -F" +" '{ print $2}' | cut -c -5 \ | cut -c -5 \ | awk '{a+=$1} END{print a/NR}' done