Created
May 15, 2019 03:24
-
-
Save ksaver/17f231e257322d19b5a1649f60460cde to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# | |
# from site: ipinfo.io | |
# gets info on given IP adress | |
if [ -z $1 ]; then | |
echo "$(basename $0) [ip address]""" | |
exit | |
fi | |
function main() { | |
curl -s -H "Content-Type: application/json" ipinfo.io/"$1" |jq | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment