<div dir="ltr">You can also use my <a href="http://hackage.haskell.org/package/process-streaming">process-streaming</a> library:<div><br></div><div>   import System.Process.Streaming<br></div><div>   import qualified Pipes.ByteString as B</div><div> </div><div>   -- collects stdout as a lazy ByteString</div><div>   execute (pipeo (fromFold B.toLazyM)) (shell "echo test")</div><div><br></div><div>It depends on the pipes ecosystem and some other stuff, however.</div><div><br></div><div><a href="http://hackage.haskell.org/package/process-streaming-0.6.5.0/docs/System-Process-Streaming-Tutorial.html">Here </a>are some examples.<br><br>On Thursday, December 11, 2014 10:11:09 AM UTC+1, Ernesto Rodriguez wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div><div>Dear All,<br><br></div>I have a program which invokes an external program via exec. I wish to capture the standard output of the program without using external (temporary) files.</div></div>
</blockquote></div></div>