The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
648 B

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # Dump set members from redis for keys matching a pattern
  6. #
  7. # Usage: rmembers keytext
  8. #
  9. # keytext : any key that contains this text will be dumped
  10. # the dump text that is printed is "key => smembers(key)"
  11. #
  12. # If the value referred to by the key is not a set, an error message will be printed.
  13. #
  14. KEY_MATCH="${1}"
  15. SEP="${2:- }"
  16. for k in $(echo 'keys *'"""${KEY_MATCH}"""'*' | redis-cli) ; do
  17. echo "$k => $(echo "smembers $k" | redis-cli | tr '\n' ''"${SEP}"'')"
  18. done