#!/bin/bash # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # KEY_MATCH="${1}" SEP="${2:- }" for k in $(echo 'keys *'"""${KEY_MATCH}"""'*' | redis-cli) ; do echo "$k => $(echo "smembers $k" | redis-cli | tr '\n' ''"${SEP}"'')" done