Skip to content

Instantly share code, notes, and snippets.

@efmeeks
Last active October 17, 2017 20:36
Show Gist options
  • Save efmeeks/2741694cdc20ff7aca92507a80614d22 to your computer and use it in GitHub Desktop.
Save efmeeks/2741694cdc20ff7aca92507a80614d22 to your computer and use it in GitHub Desktop.
ipme: ip address looker upper

ipme

ipme is an ip address looker uppper

Demo

Try It

wget -q -O - https://git.io/vdiDm | bash

Piping to the shell can be dangerous. It's always a good idea to check the source code first.

Get it

wget -q -O ipme.sh https://git.io/vdiDm

Source

#!/bin/bash

# ipme: ip address looker upper
# https://git.io/vdiMj

ipme() {
  echo ''; echo "  Public IP: $(wget -q -O - http://ipecho.net/plain)"
  echo "  Private IP: $(ifconfig | egrep 'inet' | egrep -v 'inet6|127' | awk '{ print $2 }')"
  echo -e "\x20 \x20 \xE2\x99\xA1 ipme"; echo ''
}

ipme
#!/bin/bash
# ipme: ip address looker upper
# https://git.io/vdiMj
ipme() {
echo ''; echo " Public IP: $(wget -q -O - http://ipecho.net/plain)"
echo " Private IP: $(ifconfig | egrep 'inet' | egrep -v 'inet6|127' | awk '{ print $2 }')"
echo -e "\x20 \x20 \xE2\x99\xA1 ipme"; echo ''
}
ipme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment