Skip to content

Instantly share code, notes, and snippets.

@JoeyBurzynski
Created May 1, 2016 19:37
Show Gist options
  • Save JoeyBurzynski/47d0f7bf6e2a32c9fae99922ba63f961 to your computer and use it in GitHub Desktop.
Save JoeyBurzynski/47d0f7bf6e2a32c9fae99922ba63f961 to your computer and use it in GitHub Desktop.
Bash Scripts: Echo IP Address (Internet Facing)
function myip ()
{
res=$(curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+')
echo -e "Your public IP is: ${echo_bold_green} $res ${echo_normal}"
}
myip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment