title: How to post multiple json from one file with cURL
body: <p>I have some json data store in one file. Each row of that file is a json message.</p>
  
  <p>Rather than:
  <code>curl -X POST -d '{data:{something}}'</code>
  one by one. I try to use :</p>
  
  <pre><code>   while read data
     &gt;do
     &gt;curl -X POST -d @$data
     &gt;done &lt; file
  </code></pre>
  
  <p>However it doesn't work, because shell may thing data is some text without single quote.</p>
  
  <p>Is there anyway I can modify this script?</p>
  
  <p>the error message is something like this</p>
  
  <pre><code>curl: (3) [globbing] illegal character in range specification at pos 3
  
  curl: (3) [globbing] illegal character in range specification at pos 3
  
  * getaddrinfo(3) failed for "something"::10
  * Couldn't resolve host '"something":'
  * Closing connection #1
  curl: (6) Couldn't resolve host '"something":'
  curl: (3) [globbing] unmatched brace at pos 20
  
  etc...
  </code></pre>