Posted By

berkes on 02/04/10


ip sed wget networking public

Versions (?)

Commandline oneliner to get your public IP adress

 / Published in: Bash


Use wget and sed to get your public IP adress (instead of firing up firefox and visting Usefull in scripts where you need your public IP adres.

There are probably better ways, maybe even a GNUtool that I missed?

  1. wget --quit -O - | sed -e 's/[^:]*: //' -e 's/<.*$//'

Report this snippet  


RSS Icon Subscribe to comments
Posted By: zzeroo on May 4, 2011

There is a spelling error. The wget parameter is --quiet not --quit wget --quiet -O - | sed -e 's/[^:]*: //' -e 's/

You need to login to post a comment.