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