Skip to content

Instantly share code, notes, and snippets.

@ksaver
Created May 15, 2019 03:24
Show Gist options
  • Save ksaver/17f231e257322d19b5a1649f60460cde to your computer and use it in GitHub Desktop.
Save ksaver/17f231e257322d19b5a1649f60460cde to your computer and use it in GitHub Desktop.
#!/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