This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_eth0_ipaddr() { | |
eth0_ip=$(ip addr list eth0 | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 3 | cut -d '/' -f 1) | |
echo "${eth0_ip}" | |
} | |
function get_public_ipaddr() { | |
public_ip=$(curl -s ipecho.net/plain) | |
echo "${public_ip}" | |
} |
NewerOlder