redis客户端redis-cli读取key带有空格的值

redis的某些key居然带有空格,这时要如何读取呢?

get field with spaces
get "field with spaces"
get 'field with spaces'

这三个都返回相同的错误.

And all this three return same error.
-ERR wrong number of arguments for 'get' command

正确的使用方法,如下:

get "field\ with\ spaces"

在这个链接里,找到的答案:
How to get values from Redis using keys which contains spaces? - Stack Overflow

redis-key-blank.png

你可能感兴趣的:(redis客户端redis-cli读取key带有空格的值)