1
0

brush up a tad

This commit is contained in:
dtb 2023-11-19 20:58:14 -07:00
parent 5b0230806b
commit 54fa7b7eae

View File

@ -10,11 +10,9 @@ http://ifconfig.io/
PUBLIC_IP_FETCH_URL="https://icanhazip.com" PUBLIC_IP_FETCH_URL="https://icanhazip.com"
PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL" PUBLIC_IP6_FETCH_URL="$PUBLIC_IP_FETCH_URL"
printf "%s / %s\n" \ printf '%s\ts\n' \
"$(curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL")" \ "$(curl -4 --connect-timeout 5 --silent "$PUBLIC_IP_FETCH_URL")" \
"$(curl -6 --connect-timeout 5 --silent "$PUBLIC_IP6_FETCH_URL")" \ "$(curl -6 --connect-timeout 5 --silent "$PUBLIC_IP6_FETCH_URL")" \
| sed -e 's/ \/ $//' \ | sed -e 's/ \/ $//' \
-e 's/^ \/ //' \ -e 's/^ \/ //' \
-e 's/^$/[error fetching address]/' -e 's/^$/[error fetching address]/'
exit 0