title: How to process the output of a command line-by-line as a stream
body: <p>Writing <code>SomeCommand | { ... }</code> pipes the entire output of <code>SomeCommand</code> to the code in the braces. Is there a way to "pipe" one line at a time and let the code in the braces process it line by line, without waiting for the whole output to be stored in memory?</p>
  
  <p><strong>Update</strong></p>
  
  <p>[Copied from comment]</p>
  
  <p><code>SomeCommand</code> is an executable (not a powershell cmdlet) that while running produces some output. It takes some time between the lines that it produces, and I do not want to wait until all the lines are produces to perform some operation on each line</p>