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 da5d728 commit 24e4a0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/internet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ function internet {

echo "$ip"
echo "$org"
if [[ ! echo "$info" | grep -E 'postal' ]]; then
echo "$country, $city, \"postal\": \"n/a\""
else
if $info | grep -q -E 'postal'; then
echo "$country, $city, $postal"
else
echo "$country, $city, \"postal\": \"n/a\""
fi
echo "$timezone"
;;
Expand Down

0 comments on commit 24e4a0f

Please sign in to comment.