Created
May 6, 2020 17:58
-
-
Save pedroteixeira/75ced03b24913b0485168535cac9fa22 to your computer and use it in GitHub Desktop.
Format Redis Info to JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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