]> git.rmz.io Git - dotfiles.git/blob - bin/whatsmyip
2e6c6c39d4b3ff258d6e931b13ce6efc1b192e61
[dotfiles.git] / bin / whatsmyip
1 #!/bin/bash
2
3 if hash dig 2>/dev/null; then
4 dig +short myip.opendns.com @resolver1.opendns.com
5 elif hash curl 2>/dev/null; then
6 curl -s ifconfig.me/ip
7 fi