I wish to remove secrets that match "user*".

how do you do this in redis command line?

This isn't an element now to have the ability to do over night (begin to see the comments within the [cde] documentation). Regrettably, you're only playing using DEL, looping with the results, after which using KEYS to get rid of each one of these.

What about using party a little to assist?

DEL

To step through it:

  1. for key in `echo 'KEYS user*' | redis-cli | awk '{print $1}'` do echo DEL $key done | redis-cli -- get all of the secrets and strip the extra text you wouldn't want with awk.
  2. echo 'KEYS user*' | redis-cli | awk '{print $1}' -- for every one, create an echo statement to get rid of it.
  3. echo DEL $key -- go ahead and take DEL claims and pass them into the cli.

Not recommending this is actually the ultimate way (you may have some issues if a number of your usernames have spaces inside them, but hopefully you understand).