string - Redis SET fails when value has spaces -


i fired redis , playing around it. following works fine:

set billybob "hello" +ok 

however, following fails:

set billybob "hey how you" -err syntax error 

i thought set worked key/value, , presumably value can string... not string spaces? what's story here?

maybe version related. here works:

$ redis-cli --version redis-cli 2.8.3  $ redis-cli set billybob "hey how you" ok  $ redis-cli billybob "hey how you" 

@jm3 use '-x' command line option redis-cli instead. beware add "\n" @ end of string:

$ echo "hey how you" hey how  $ echo "hey how you" | redis-cli --pipe set billybob data transferred. waiting last reply... err unknown command 'hey' last reply received server. errors: 1, replies: 1  $ echo "hey how you" | redis-cli -x set billybob ok $ redis-cli billybob "hey how you\n" 

hth

bernie


Comments