title: How to parse output of stdout
body: <p>For example if execute in nodejs child process something like: </p>
  
  <pre><code>exec("find /path/to/directory/ -name '*.txt'", callback);
  </code></pre>
  
  <p>How can i parse the streamed output in my callback function to an array to get something like so?</p>
  
  <pre><code>['file-1.txt', 'file-2.txt', 'file-3.txt', ...]
  </code></pre>
  
  <p>The current output is like following: </p>
  
  <pre><code>path/to/file-1.txt
  path/to/file-2.txt
  path/to/file-3.txt
  </code></pre>
  
  <p>Thanks for helping</p>