Skip to content

Instantly share code, notes, and snippets.

@pedroteixeira
Created May 6, 2020 17:58
Show Gist options
  • Save pedroteixeira/75ced03b24913b0485168535cac9fa22 to your computer and use it in GitHub Desktop.
Save pedroteixeira/75ced03b24913b0485168535cac9fa22 to your computer and use it in GitHub Desktop.
Format Redis Info to JSON
echo "info" | redis-cli | grep -v '^#' | grep -v -e '^[[:space:]]*$' | sed 's/\r//g' | jq --raw-input 'split(":")| {(.[0]): .[1]}' | jq -s add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment