6 lines
253 B
Bash
Executable file
6 lines
253 B
Bash
Executable file
#!/bin/bash
|
|
|
|
API_ENDPOINT="http://ip-api.com/json/$1"'?fields=7876383'
|
|
printf "%s" "$(curl "${API_ENDPOINT}" 2>/dev/null)" | jq -r '[ "IP: \(.query)", "Country: \(.country)", "City: \(.city)", "ISP: \(.isp)", "ASN: \(.as)" ][] | "\(.)"'
|
|
|
|
# vim: ft=bash
|