Skip to content

Instantly share code, notes, and snippets.

@nathan-russell
Last active November 23, 2015 23:34
Show Gist options
  • Save nathan-russell/2cbd46e98cba4785d2de to your computer and use it in GitHub Desktop.
Save nathan-russell/2cbd46e98cba4785d2de to your computer and use it in GitHub Desktop.
IP Address Geographical Information Using ipinfo.io
#!/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
@nathan-russell
Copy link
Author

Free / non-license limit of 1000 requests per day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment