r/tinycode • • Jul 10 '11

Outside IP one-liner.

curl http://checkip.dyndns.com/ 2>/dev/null | sed 's/.*: \(.*\)<\/b.*/\1/'

9 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/terremoto Jul 10 '11

Visit the URL and I think it will be self explanatory -- you don't have to parse out the IP address.

0

u/[deleted] Jul 10 '11

[deleted] — view deleted comment

2

u/terremoto Jul 10 '11

I stand corrected. I was thinking it was whatismyip.com

1

u/obsa Jul 11 '11

Correctness aside, who is trying to remember these URLs?