From f3e9d39a44b227836debf4bfb3a40e573eacaf7c Mon Sep 17 00:00:00 2001 From: Teddysun Date: Wed, 9 Sep 2015 14:26:10 +0800 Subject: [PATCH] IP address --- bench.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bench.sh b/bench.sh index c2e08d4..e0f40ed 100644 --- a/bench.sh +++ b/bench.sh @@ -19,8 +19,8 @@ next() { speed_test() { speedtest=$(wget -4O /dev/null $1 2>&1 | awk '/\/dev\/null/ {speed=$3 $4} END {gsub(/\(|\)/,"",speed); print speed}') - ipcheck=$(curl -4v -r 0-128 -o /dev/null $1 2>&1| awk -F'[()]' '/Connected/{print$2}') - echo -e "Download speed from \e[33m$2\e[0m(IP:\e[32m$ipcheck\e[0m): \e[31m$speedtest\e[0m" + ipaddress=$(curl -4v -r 0-128 -o /dev/null $1 2>&1 | awk -F'[()]' '/Connected/{print$2}') + echo -e "Download speed from \e[33m$2\e[0m(IP:\e[32m$ipaddress\e[0m): \e[31m$speedtest\e[0m" } speed() {