myip command

This commit is contained in:
thek4n 2025-01-09 00:24:09 +03:00
parent e7bfa7fdf6
commit 26e6bd40bb

View File

@ -1,6 +1,12 @@
#!/bin/sh
curl ipinfo.io/ip
TAB="$(printf -- '\t')"
{
printf "%s\t" "curl ipinfo.io/ip"
curl ipinfo.io/ip 2>/dev/null
echo
dig +short myip.opendns.com @resolver1.opendns.com
printf "%s\t" "dig +short myip.opendns.com @resolver1.opendns.com"
dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null
} | column -t -s "${TAB}"