Is it possible to easily set a specific value from a file using interactive redis-cli?
Since -x reads the last argument from STDIN , how about:
redis-cli -x HSET some_key image_binary <some.jpg
Then you can easily get the file as follows:
redis-cli --raw HGET some_key image_binary > img.jpg
Note that there is an extra \n character at the end.
source share