Skip to content

Commit

Permalink
internet reverse reorder and keep unique (fixes #2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLKwong committed Mar 26, 2021
1 parent 1f05b4d commit 616d5dc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/internet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ function internet {
info="$(curl -s ipinfo.io | grep -o '"[^"]*"\s*:\s*"[^"]*"')"
ip=$(echo "$info" | grep -e '"ip": "')
org=$(echo "$info" | grep -e '"org": "')
country=$(echo "$info" | grep -e '"country": "')
country=$(echo "$info" | grep -o '"country": "[^;]*')
city=$(echo $info | grep -e '"city": "')
postal=$(echo $postal | grep -e '"postal": "')
timezone=$(echo $postal | grep -e '"timezone": "')

echo " INFO: $info"
echo ""
echo " IP: $ip"
echo " ORG: $org"
# echo " INFO: $info"
# echo ""
# echo " IP: $ip"
# echo " ORG: $org"
echo " COUNTRY: $country"
echo " CITY: $city"
echo " POSTAL: $postal"
echo " TIMEZONE: $timezone"
# echo " CITY: $city"
# echo " POSTAL: $postal"
# echo " TIMEZONE: $timezone"


echo "$ip"
Expand Down

0 comments on commit 616d5dc

Please sign in to comment.