Last active
November 23, 2015 23:34
-
-
Save nathan-russell/2cbd46e98cba4785d2de to your computer and use it in GitHub Desktop.
IP Address Geographical Information Using ipinfo.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
LBREAK="=====================================================" | |
echo -e "\n" | |
## | |
if [[ -z "$@" ]] | |
then | |
ipCMD="ipinfo.io/" | |
echo Using own public IP Address: | |
curl -s "$ipCMD" | |
echo -e "\n$LBREAK\n" | |
fi | |
## | |
for ip in "$@" | |
do | |
ipCMD="ipinfo.io/${ip}" | |
echo IP Address: "$ip" | |
curl -s "$ipCMD" | |
echo -e "\n\n$LBREAK\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Free / non-license limit of 1000 requests per day