Re: [Haskell-cafe] Call external program and get stdout

2007-11-24 Thread Allan Clark
Roberto Zunino wrote: Allan Clark wrote: -- Create the process do (_pIn, pOut, pErr, handle) - runInteractiveCommand command -- Wait for the process to finish and store its exit code exitCode - waitForProcess handle Warning: this will get stuck if the command output is so

Re: [Haskell-cafe] Call external program and get stdout

2007-11-24 Thread Thomas Hartman
dons did a blog post about a shell monad which I think does what you ask. http://cgi.cse.unsw.edu.au/~dons/blog/2007/03 very nice, I use it myself. t. 2007/11/22, Maurí­cio [EMAIL PROTECTED]: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All

Re: [Haskell-cafe] Call external program and get stdout

2007-11-23 Thread Roberto Zunino
Allan Clark wrote: -- Create the process do (_pIn, pOut, pErr, handle) - runInteractiveCommand command -- Wait for the process to finish and store its exit code exitCode - waitForProcess handle Warning: this will get stuck if the command output is so big that it fills the SO

[Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Maurí­cio
Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program. Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Jules Bean
Maurí­cio wrote: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program. http://haskell.org/ghc/docs/latest/html/libraries/process-1.0.0.0/System-Process.html

Re: [Haskell-cafe] Call external program and get stdout

2007-11-22 Thread Allan Clark
Jules Bean wrote: Maurí­cio wrote: Hi, How can I call a program (like, for instance, 'grep text *') and get the standard output? All actions I found (executeFile, system) do not give me the output of the program.