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

Click here to return to the 'CORRECTION!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: zendrew on Nov 04, '04 12:38:07AM
Sorry! The script I sent in my previous post will truncate many IP addresses. I inadvertently copied that snippet from my flawed first effort at this script, in which I had (half-asleep, I swear!) simply counted the 11 characters in my IP address (that day) and plugged that number into the script. Duh. I found the mistake as soon as I ran the script at work, where I had a longer IP address.

Here's the correct version:

set TheAddress to (do shell script "curl -f | awk '{print substr($6,1,length($6)-15)}'")

display dialog {"Your IP address is: ", TheAddress} as string

[ Reply to This | # ]