aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/scripts/ip.sh
blob: 547c451f697809578e56944f19c21d9dd737e975 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# sudo apt install dnsutils jq && sudo -H pip3 install speedtest-cli

myip=$(dig +short myip.opendns.com @resolver1.opendns.com)
geoip=$(curl -s ipinfo.io/"$myip" | jq -r '[.country, .city] | join(", ")')

echo "$myip ($geoip)"
speedtest-cli --simple --secure

exit 0