Skip to content
This repository was archived by the owner on May 9, 2018. It is now read-only.

Commit b909f28

Browse files
author
Zachary DuBois
committed
I need to start testing .-.
1 parent a5c903e commit b909f28

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

do-cli-speedtest

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ downloadTest() {
130130
scheme="http://"
131131
fi
132132

133-
speedRaw=$( wget -O /dev/null --user-agent "'$userAgent'" $scheme$hostname/$downloadFile 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}' )
134-
speed="$(tput setaf 2)$speedRaw$(tput sgr0)"
133+
speed=$( wget -O /dev/null --user-agent "'$userAgent'" $scheme$hostname/$downloadFile 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}' )
135134
echo "$ok $name Speed: $speed."
136135
}
137136

@@ -155,8 +154,7 @@ pingTest() {
155154
name=$1
156155
hostname=$2
157156
pingRaw=$(ping -qc 10 -i .5 $hostname)
158-
avgPingRaw="$(echo "$pingRaw" | awk -F'/' '/^(rtt|round-trip)/ { print $5 }')"
159-
avgPing="$(tput setaf 2)"$avgPingRaw"ms$(tput sgr0)"
157+
avgPing="$(echo "$pingRaw" | awk -F'/' '/^(rtt|round-trip)/ { print $5 }')"
160158
echo "$ok $name Average Latency: $avgPing."
161159
pkLoss="$(echo "$pingRaw" | awk -F',' '/packet loss/ { print $3 }' | awk -F' ' '{ print $1 }')"
162160
if ! [[ "$pkLoss" =~ ^(0\.0\%|0\%) ]]

0 commit comments

Comments
 (0)