mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 07:39:36 +01:00
8 lines
189 B
Bash
Executable File
8 lines
189 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ip=$(curl "https://api.ipify.org" 2>/dev/null)
|
|
|
|
res=$(curl -s "http://ip-api.com/json/$ip" 2>/dev/null)
|
|
# echo $res | jq '.'
|
|
echo $res | jq -r -j '.city, ", ", .country, "\n"'
|