Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Capture the names of the keys (sets)
- KEYS=$(redis-cli keys 'myset:*')
- # Paste each line from the key names with the output of `redis-cli scard key`
- # and sort on the second key in reverse
- paste <(echo "$KEYS") <(echo "$KEYS" | sed 's/^/scard /' | redis-cli) | sort -k2 -r
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement