我尝试多次插入,但它给了我错误 - 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
我做错了什么?
答案 0 :(得分:5)
您可以尝试以下方法:
echo -e "$(cat mass_insert.txt)" | redis-cli --pipe