Skip to content

Instantly share code, notes, and snippets.

@antiops
Last active June 14, 2021 07:26
Show Gist options
  • Select an option

  • Save antiops/7f379fc861da566e688fe4fc0f6e00c0 to your computer and use it in GitHub Desktop.

Select an option

Save antiops/7f379fc861da566e688fe4fc0f6e00c0 to your computer and use it in GitHub Desktop.
get minecraft usernames from the server user cache file
# Using tr. Removes all quotes
cat usercache.json | jq .[].name | uniq | sort | tr -d '"'
# Using sed. Only removes first & last quotes
cat usercache.json | jq .[].name | uniq | sort | sed -e 's/^"//' -e 's/"$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment