Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Get your IP number from the terminal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Get your IP number from the terminal
Authored by: n1mie on Jan 18, '06 11:31:03AM

This is an old hint, but it helped me hone in on an updated solution. The address suggested in the original hint doesn't work anymore. You can use the new one (or several others) suggested by my update.

This single line of code will get your external ip address and return only that, nothing else, using STANDARD tools included with OS X (wget is not included in current OS X installation).

[CODE]
curl -s http://checkip.dyndns.org/ | grep -o '[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9]*'
[/CODE]

---
--Chip



[ Reply to This | # ]