From a71c497ef27023820035aee73e9cc583dc4acf92 Mon Sep 17 00:00:00 2001 From: Jason Hobbs Date: Mon, 11 Dec 2023 15:00:21 -0600 Subject: [PATCH] Update dnstest.sh to allow for tabs in resolv.conf --- dnstest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dnstest.sh b/dnstest.sh index a617d26..3a62ebc 100755 --- a/dnstest.sh +++ b/dnstest.sh @@ -5,7 +5,7 @@ command -v bc > /dev/null || { echo "error: bc was not found. Please install bc. { command -v drill > /dev/null && dig=drill; } || { command -v dig > /dev/null && dig=dig; } || { echo "error: dig was not found. Please install dnsutils."; exit 1; } -NAMESERVERS=`cat /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2 | sed 's/\(.*\)/&#&/'` +NAMESERVERS=`cat /etc/resolv.conf | grep ^nameserver | cut -f 2 | cut -d " " -f 2 | sed 's/\(.*\)/&#&/'` PROVIDERSV4=" 1.1.1.1#cloudflare