dotfiles/scripts/whereami

6 lines
138 B
Plaintext
Raw Normal View History

2022-03-01 14:07:01 +01:00
#!/bin/bash
2022-03-17 22:38:39 +01:00
res=$(curl -s "http://ip-api.com/json/" 2>/dev/null)
2022-03-01 14:07:01 +01:00
# echo $res | jq '.'
echo $res | jq -r -j '.city, ", ", .country, "\n"'