Commandline oneliner to get your public IP adress

/ Published in: Bash
Save to your folder(s)

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?

Copy this code and paste it in your HTML
  1. wget --quit -O - | sed -e 's/[^:]*: //' -e 's/<.*$//'


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.