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


Click here to return to the 'Copy public IP address to clipboard via keyboard shortcut' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Copy public IP address to clipboard via keyboard shortcut
Authored by: Sesquipedalian on Jan 20, '11 09:35:37AM
Rather than
MYIP=`curl -s 'http://checkip.dyndns.org' | sed 's/.*Current IP Address: \([0-9\.\.]*\).*/\1/g'`
you could instead use
MYIP=`curl 'http://www.whatismyip.com/automation/n09230945.asp'`
This option returns an html document whose only content is the IP number (not even an <html> tag is included), so there is no need to parse it at all. This allows you to skip the invocation of sed.

[ Reply to This | # ]
Copy public IP address to clipboard via keyboard shortcut
Authored by: robg on Jan 20, '11 01:06:42PM
Nice change; I've been using the checkip site for so many years I just copy and paste the same line over and over.

thx;
-rob.
---
Partner at Many Tricks, maker of useful apps
http://manytricks.com
Edited on Jan 20, '11 01:08:13PM by robg


[ Reply to This | # ]