dotfiles/scripts/whereami

6 lines
138 B
Plaintext
Raw Normal View History

2023-12-25 11:21:57 +01:00
#!/bin/bash
res=$(curl -s "http://ip-api.com/json/" 2>/dev/null)
# echo $res | jq '.'
echo $res | jq -r -j '.city, ", ", .country, "\n"'