Is there a way to pass the return value of one function to another in Redis? Of course, if you're using a language wrapper (like Ruby), it's easy — but what about from the CLI?
e.g. something like this, bash style
redis 127.0.0.1:6379> keys student* | mget
or something like this
redis 127.0.0.1:6379> mget(keys student*)
keys student*
will return a list of keys, but I've no idea how to fetch all the values for those keys.
Thoughts?
From the CLI, you just have to let the shell do its job.
./redis-cli --raw keys 'student:*' | awk '{printf "get %s\n", $1}' | ./redis-cli --raw
Please note you are not supposed to use the keys command in applications because of its linear complexity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With