Friday, 19 October 2012

cihip bash script

Just a quickie, I wrote a bash version of my Can I Haz IP script which does little more than display your public IP address by returning content from http://myip.dnsomatic.com. I use it more often than I imagined, so I thought I'd put a copy up here.

#!/bin/sh
#cihip Can I Haz IP?
IP=$(curl -sS http://myip.dnsomatic.com/)
echo $IP

No comments: