Quickly obtain your public IP
Whenever I’m at a customer for work, I sometimes need to know the public ip. I always went with a browser to checkip.dyndns.org to get the current public ip of the customer. lauching the browser, typing in the website url.. takes time. I always have my terminal window open, so I tought, can’t we script this? Yes we can:
#!/bin/bash publicip_=`curl -s --connect-timeout 3 checkip.dyndns.org | sed 's/[^0-9\.]//g'` echo $publicip_
save it as publicip under /usr/local/sbin/ and execute chmod +x /usr/local/sbin/publicip . whenever you need the public ip, just run “publicip” from the terminal and it shouts out your current public ip.
you’re welcome.

![The Magic Mouse under Ubuntu [update]](http://blog.subutux.be/wp-content/uploads/2011/02/magic-mouse-ubuntu-638x300.png)










