diff --git a/app/speed b/app/speed index 5929bc1..dc41245 100755 --- a/app/speed +++ b/app/speed @@ -33,24 +33,21 @@ test_speed() { loge Check internet connection. return 0 } - local out + local down host out up out="$(speedtest-cli 2>&1)" || { - loge "$(printf %s "$out" | xargs)" + loge "$out" return 0 } - local down down="$(printf %s "$out" | grep -E '^Download: ' | gawk '{print $2}')" || { - loge "$out: $down" + loge "$out: $down: down." return 0 } - local up up="$(printf %s "$out" | grep -E '^Upload: ' | gawk '{print $2}' )" || { - loge "$out: $up" + loge "$out: $up: up." return 0 } - local host host="$(printf %s "$out" | grep -E '^Hosted by ' | cut -c11- )" || { - loge "$out: $host" + loge "$out: $host: host." return 0 } tsout "| $(printf %6s "$down") | $(printf %6s "$up") | $host"