This commit is contained in:
thek4n 2025-08-10 20:40:27 +03:00
parent c85397220a
commit c02fb05f22

View File

@ -13,9 +13,13 @@ execute_and_format_result() {
printf "%s\t%s\n" "${ip}" "${cmd}" printf "%s\t%s\n" "${ip}" "${cmd}"
} }
if [ "${1}" = '--short' ]; then
curl ip.thek4n.ru
exit "${?}"
fi
{ {
execute_and_format_result curl ipinfo.io/ip execute_and_format_result curl ipinfo.io/ip
execute_and_format_result curl ip.thek4n.ru execute_and_format_result curl ip.thek4n.ru/
execute_and_format_result dig +short myip.opendns.com @resolver1.opendns.com execute_and_format_result dig +short myip.opendns.com @resolver1.opendns.com
} | column -t -s "${TAB}" } | column -t -s "${TAB}"