title: Not able to perform mass insertion in redis
body: <p>I am working on centos 6. I want to perform mass insertion into redis cache from mySQL table that has more than 10 million records. I have already read about redis protocol and its format. I am able to copy table data into redis protocol format in text file. But when I try to execute pipe command an error is coming.</p>
  
  <pre><code>Error reading from the server: Connection reset by peer
  </code></pre>
  
  <p>or</p>
  
  <pre><code>ERR Protocol error: expected '$', got '3'
  </code></pre>
  
  <p>I am using following command:</p>
  
  <pre><code>cat insert.txt | redis-cli --pipe
  </code></pre>
  
  <p>insert.txt contains data in this format:</p>
  
  <pre><code>*3
  $3
  SET
  $2
  K1
  $2
  V1
  </code></pre>
  
  <p>If possible,please tell me format for multiple commands in this text file as in above example, this file only contains one set command. I will be thankful if you will give me example of text file which has at least two commands in it.</p>
  
  <p>I have also tried file data in this format.</p>
  
  <pre><code>"*3\r\n$3\r\nSET\r\n$3\r\nkey\r\n$5\r\nvalue\r\n"
  </code></pre>
  
  <p>It gives the following error:</p>
  
  <pre><code>ERR unknown command '*3  $3  SET  $3  key  $5  value  '
  </code></pre>