From 4e98c0ceff43167e712f9ad2beecbea2a66eea15 Mon Sep 17 00:00:00 2001 From: ADTC Date: Thu, 14 Apr 2022 01:01:25 +0800 Subject: [PATCH 1/2] Make the header line a little better --- dnstest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnstest.sh b/dnstest.sh index a617d26..93d06ad 100755 --- a/dnstest.sh +++ b/dnstest.sh @@ -68,10 +68,10 @@ DOMAINS2TEST="www.google.com amazon.com facebook.com www.youtube.com www.reddit. totaldomains=0 -printf "%-21s" "" +printf "%-21s" "DNS Name / Tests >" for d in $DOMAINS2TEST; do totaldomains=$((totaldomains + 1)) - printf "%-8s" "test$totaldomains" + printf "%-8s" "$totaldomains" done printf "%-8s" "Average" echo "" From e41a89be09da612e0f1b4f51206ef5da41fd7ca1 Mon Sep 17 00:00:00 2001 From: ADTC Date: Thu, 14 Apr 2022 01:02:41 +0800 Subject: [PATCH 2/2] Show the DNS IP address as an extra column on the right --- dnstest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnstest.sh b/dnstest.sh index 93d06ad..0ad8757 100755 --- a/dnstest.sh +++ b/dnstest.sh @@ -73,7 +73,7 @@ for d in $DOMAINS2TEST; do totaldomains=$((totaldomains + 1)) printf "%-8s" "$totaldomains" done -printf "%-8s" "Average" +printf "%-8s" "Average IP Address" echo "" @@ -97,7 +97,7 @@ for p in $NAMESERVERS $providerstotest; do done avg=`bc -l <<< "scale=2; $ftime/$totaldomains"` - echo " $avg" + echo " $avg $pip" done