When I pipe the echo to redis client, I get an error.
[root@server ~]$ echo "abc43345" | redis-cli set my_passwd2
(error) ERR wrong number of arguments for 'set' command
But the following works as expected.
[root@server ~]$ redis-cli set my_passwd2 `echo "abc43345"`
OK
Is there any way to make the first example work?
It can actually be achieved using "-x" flag
echo "abc43345" | redis-cli -x set my_passwd2
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