Redis的多插入问题 [英] Redis multi insert issue

查看:1389
本文介绍了Redis的多插入问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尽量多的插入,但它给我的错误 -
http://pastie.org/7337421

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 ?

推荐答案

你可以尝试以下方法:


回声-e$(猫mass_insert.txt)| Redis的-CLI --pipe

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

这篇关于Redis的多插入问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆