redis-version: 3.0.7

I referred to mass insertion and run the command as follow

 echo -n "*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n"  | redis-cli --pipe

And here is th output:

All data transferred. Waiting for the last reply...
ERR Protocol error: invalid multibulk length

Any kind of help will be appreciated :)

Comment From: srhitesh

For above problem you can use command like --

echo -n $'*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n' | redis-cli --pipe

Please try like this. Working for me.

Comment From: codetycon

@srhitesh echo will not work for the large string as it has some limit. For me cat is not working.

I added redis protocol commands in the data.txt and then tried : cat data.txt | redis-cli --pipe