diff options
Diffstat (limited to '')
-rw-r--r-- | bash_functions.d/get-location-from-ip.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bash_functions.d/get-location-from-ip.sh b/bash_functions.d/get-location-from-ip.sh new file mode 100644 index 0000000..840de2b --- /dev/null +++ b/bash_functions.d/get-location-from-ip.sh @@ -0,0 +1,3 @@ +get-location-from-ip() { + curl -s https://ipvigilante.com/$(curl -s https://ipinfo.io/ip) | jq '.data.latitude, .data.longitude, .data.city_name, .data.country_name' +} |