From c02fb05f221a57e41f161bc7f957e217109bc41d Mon Sep 17 00:00:00 2001 From: thek4n Date: Sun, 10 Aug 2025 20:40:27 +0300 Subject: [PATCH] fix myip --- home/user/.local/bin/myip | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/user/.local/bin/myip b/home/user/.local/bin/myip index b2fe46a..0127447 100755 --- a/home/user/.local/bin/myip +++ b/home/user/.local/bin/myip @@ -13,9 +13,13 @@ execute_and_format_result() { 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 ip.thek4n.ru + execute_and_format_result curl ip.thek4n.ru/ execute_and_format_result dig +short myip.opendns.com @resolver1.opendns.com } | column -t -s "${TAB}"