Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treehouses internet reverse refactor (fixes #2137) #2140

Merged
merged 45 commits into from
Apr 1, 2021
Merged

Conversation

JLKwong
Copy link
Member

@JLKwong JLKwong commented Mar 26, 2021

No description provided.

@JLKwong JLKwong marked this pull request as ready for review March 26, 2021 03:33
Comment on lines +17 to +22
ip=$(echo "$info" | grep -e '"ip": "')
org=$(echo "$info" | grep -e '"org": "')
country=$(echo "$info" | grep -o '"country": "[^;]*')
city=$(echo $info | grep -o '"city": "[^;]*' | cut -d '"' -f 4)
postal=$(echo $info | grep -o '"postal": "[^;]*' | cut -d '"' -f 4)
timezone=$(echo $info | grep -o '"timezone": "[^;]*' | cut -d '"' -f 4)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like you can trim the grep into jq but with how unreliable jq maybe sometime, it is best to leave it how it is.

Comment on lines 28 to 31
echo "$ip"
echo "$org"
echo "$country, \"city\": \"$city\", \"postal\": \"$postal\""
echo "\"timezone\": \"$timezone\""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the original, organization and timezone were at the bottom. But this is fine 👍

@dogi dogi changed the title treehouses internet reverse reorder and keep unique values (fixes #2137) treehouses internet reverse refactor (fixes #2137) Apr 1, 2021
@dogi dogi merged commit 366263e into master Apr 1, 2021
JLKwong added a commit that referenced this pull request Apr 2, 2021
Co-authored-by: dogi <dogi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants