|
|
Geolocate a number of IP addresses via shell script
Why on earth would you want to cat arguments to a random file called 'list' before doing anything on them?
Geolocate a number of IP addresses via shell script
Here's a better version, which doesn't write to any files. It also only relies on programs that are already installed on all Mac OS X machines, not extra downloads.
#!/bin/bash
for IP in $*
do
curl -s http://www.geoiptool.com/en/?IP=${IP} | textutil -convert txt -stdin -stdout -format html | sed -n '/Host Name/,/Postal code/p'
done
Geolocate a number of IP addresses via shell script
Almost all. I don't have textutil on 10.3.9.
Geolocate a number of IP addresses via shell script
This seems to leave out data. I get this for the IP in the hint:
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|