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 c507f61 commit 17f72c3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/internet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ function internet {
echo "$info" | grep -E '"(ip)"'
echo "$info" | grep -E '"(org)"'
echo "1"
echo "$info" | grep -E '"(country)"'
echo "$info" | grep -E '"(country|city|postal)"'
echo "2"
echo "$info" | grep -E '"(city)"'
echo "$info" | grep -E '"(postal)"'
if ! echo "$info" | grep -E 'postal'; then
echo "$info" | grep -E '"(country|city)"' | tr '\n' ',' | sed 's/,$/, "postal": "n\/a"\n/' | sed 's/\",\"/\", \"/g'
else
Expand Down

0 comments on commit 17f72c3

Please sign in to comment.