Posted By

fnurl on 04/05/09


Tagged

ip internet


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bhubbard


Display external IP


 / Published in: Bash
 

URL: http://lifehacker.com/5194123/display-your-public-ip-address-in-the-shell-prompt

  1. # curl version (e.g. OS X)
  2. curl -s myip.dk |grep '"Box"' | egrep -o '[0-9.]+'
  3.  
  4. # wget version (e.g. Linux)
  5. wget -O - -q myip.dk |grep '"Box"' | egrep -o '[0-9.]+'

Report this snippet  

You need to login to post a comment.