From b6fdd80ff66b4992424c5b4de1469f08c2ad46cb Mon Sep 17 00:00:00 2001 From: JLKwong Date: Thu, 25 Mar 2021 20:59:50 -0700 Subject: [PATCH] internet reverse reorder and keep unique (fixes #2137) --- modules/internet.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/internet.sh b/modules/internet.sh index 1adc8ecf4..c14cfdcfe 100644 --- a/modules/internet.sh +++ b/modules/internet.sh @@ -14,12 +14,12 @@ function internet { log_and_exit1 "Error: no internet found" fi 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)"') - city=$(echo $info | grep -E '"(city)"') - postal=$(echo $postal | grep -E '"(postal)"') - timezone=$(echo $postal | grep -E '"(timezone)"') + ip=$(echo "$info" | grep -e '"(ip)"') + org=$(echo "$info" | grep -e '"(org)"') + country=$(echo "$info" | grep -e '"(country)"') + city=$(echo $info | grep -e '"(city)"') + postal=$(echo $postal | grep -e '"(postal)"') + timezone=$(echo $postal | grep -e '"(timezone)"') echo " IP: $ip" echo " ORG: $org"