From db30b4721d96cc7e547763b63a65fb680d8679a8 Mon Sep 17 00:00:00 2001 From: dtb Date: Sat, 22 Oct 2022 01:42:01 -0400 Subject: [PATCH] remove nmh tunnel vision --- ifpublic/ifpublic | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/ifpublic/ifpublic b/ifpublic/ifpublic index 4cade4d..48b181b 100755 --- a/ifpublic/ifpublic +++ b/ifpublic/ifpublic @@ -10,15 +10,10 @@ http://ifconfig.io/ PUBLIC_IP_FETCH_URL="https://icanhazip.com" PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" -pscat \ - [ curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL" \ - ] \ - [ printf ' / ' ] \ - [ curl -6 --connect-timeout 5 --silent \ - "$PUBLIC_IP6_FETCH_URL" ] \ - | tr -d '\n' \ - | xargs echo \ - | sed 's/ \/$//g' \ - | sed 's/^\/ //g' +printf "%s / %s\n" \ + "$(curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL")" \ + "$(curl -6 --connect-timeout 5 --silent "$PUBLIC_IP6_FETCH_URL")" \ + | sed 's/ \/ $//g' \ + | sed 's/^ \/ //g' exit 0