ref
This commit is contained in:
parent
7beb5bc38b
commit
0a66d62165
@ -6,7 +6,7 @@ readonly TAB
|
|||||||
|
|
||||||
|
|
||||||
execute_and_format_result() {
|
execute_and_format_result() {
|
||||||
cmd="${1}"
|
cmd="${@}"
|
||||||
|
|
||||||
ip="$(${cmd} 2>/dev/null)"
|
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 curl ipinfo.io/ip
|
||||||
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}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user