shell-network/function/net-utils.sh

8 lines
105 B
Bash

publicip () {
dig +short myip.opendns.com @resolver1.opendns.com
}
getip () {
dig +short $1 | tail -1
}