Redis multi insert issue

假装没事ソ 提交于 2019-12-23 21:14:11

问题


I try to multi-insert but it gives me error - http://pastie.org/7337421

$ cat mass_insert.txt 
*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n
$ cat mass_insert.txt | redis-cli --pipe
All data transferred. Waiting for the last reply...
ERR Protocol error: invalid multibulk length

What am I doing wrong ?


回答1:


Can you try the following:
echo -e "$(cat mass_insert.txt)" | redis-cli --pipe



来源:https://stackoverflow.com/questions/15848126/redis-multi-insert-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!