This repository was archived by the owner on May 9, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff 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\% ) ]]
You can’t perform that action at this time.
0 commit comments