Skip to content

Instantly share code, notes, and snippets.

@saqibameen
Created February 10, 2019 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saqibameen/54dd6e4d5556d188a5fd7c2721b084a9 to your computer and use it in GitHub Desktop.
Save saqibameen/54dd6e4d5556d188a5fd7c2721b084a9 to your computer and use it in GitHub Desktop.
# The IPs inside input.txt file.
75.72.7.215
216.189.129.6
38.88.189.58
# Using the `xargs` command to perform lookup for each of the IP.
cat input.txt | xargs -I% curl http://ipinfo.io/%/country
# Output.
US
US
US
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment