English 中文(简体)
重新分解产出的外消
原标题:Extra slash in redis output
  • 时间:2011-11-11 08:53:08
  •  标签:
  • redis

在以下例子中,我为什么在扼杀结束时会遇到额外的冲突。

[root@server src]# echo  testme one more word new line  | ./redis-cli -x set mytest
OK

[root@server src]# ./redis-cli 
redis> get mytest
"testme one more word new line"

在上述例子中,我不想在“线”上。 最初的对应说明中没有。

最佳回答

What I m getting is not a backslash, but a break line (backslash+n). That is added by the "echo" command. You can use echo -n to avoid that extra break line:

$ echo -n  testme one more word new line  | ./src/redis-cli -x set mytest
OK
$ ./src/redis-cli get mytest
"testme one more word new line"
问题回答

暂无回答




相关问题
How do you mix SQL DB vs. Key-Value store (i.e. Redis)

I m reviewing my code and realize I spend a tremendous amount of time taking rows from a database, formatting as XML, AJAX GET to browser, and then converting back into a hashed javascript object ...

Predis sharding (consistent hashing)

Predis claim to have Client-side sharding (support for consistent hashing of keys). http://github.com/nrk/predis I can do sharding using connect to an array of profiles (nodes) but it isn t ...

key value stores for extendable objects

http://www.infoq.com/presentations/newport-evolving-key-value-programming-model is a video about KV stores, and the whole premise is that redis promotes a column-based style for storing the attributes ...

nginx/redis and handling tracking params in url

I am using nginx and redis in my website. For several items on my site, I want to add tracking params to their urls so that when a user clicks on an item, I can collect statistics of user usage apart ...

热门标签