Compare commits

...

1 Commits

Author SHA1 Message Date
bb20acab34 Fix a bunch of bugs with the incomplete impl of packetloss 2021-02-28 01:23:33 -06:00

View File

@@ -5,7 +5,7 @@ declare -a servers=('1.1.1.1' '8.8.8.8')
declare -i highestloss=0
declare -i alltimehighest=0
declare -i alltimelowest=0
declare -i alltimelowest=100
declare -i iterations=1
while :; do
@@ -23,6 +23,12 @@ while :; do
if (( highestloss > 0 )); then
color="\e[31m"
fi
if (( highestloss > alltimehighest )); then
alltimehighest="$highestloss"
fi
if (( highestloss < alltimelowest )); then
alltimelowest="$highestloss"
fi
printf "\\rCurrent loss: $color%-3.3s\e[0m - \e[33m%-4.4s \e[34m%-4.4s \e[0m%-4.4s" \
"$highestloss" \
"$alltimehighest" \