title: How do you print chunked output with curl?
body: <p>I can see chunked output as it arrives with:</p>
  
  <pre><code>curl http://asia.dabase.com:4000
  </code></pre>
  
  <p>However when I try loop and work with it like so:</p>
  
  <pre><code>curl -s http://asia.dabase.com:4000 | while read line; do echo $line; done
  </code></pre>
  
  <p>It doesn't print anything. :(</p>
  
  <p>A previous answer suggests <a href="https://stackoverflow.com/a/7202947/4534">CURLOPT_WRITEFUNCTION</a>, though I don't see how that's done from curl's manpage.</p>