From 0a66d62165fcdf9d2e7350f18321b60bf19c39fb Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 13 Jan 2025 23:17:25 +0300 Subject: [PATCH] ref --- home/user/.local/bin/myip | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/home/user/.local/bin/myip b/home/user/.local/bin/myip index ef92d9c..4e09f86 100755 --- a/home/user/.local/bin/myip +++ b/home/user/.local/bin/myip @@ -6,7 +6,7 @@ readonly TAB execute_and_format_result() { - cmd="${1}" + cmd="${@}" ip="$(${cmd} 2>/dev/null)" @@ -15,6 +15,6 @@ execute_and_format_result() { { - execute_and_format_result "curl ipinfo.io/ip" - execute_and_format_result "dig +short myip.opendns.com @resolver1.opendns.com" + execute_and_format_result curl ipinfo.io/ip + execute_and_format_result dig +short myip.opendns.com @resolver1.opendns.com } | column -t -s "${TAB}"