[Haskell-cafe] getting output from shell commands

Olivier Boudry olivier.boudry at gmail.com
Thu May 15 15:37:25 EDT 2008

Hi Philip,

I just asked a question to the list about using runInteractiveCommand. You
may find the code useful but will need to either remove the forkIO
instruction or synchronize the two threads using a MVar to avoid the
concurrency problem I had.

You'll find the thread here:




On Thu, May 15, 2008 at 3:18 PM, Philip Müller <mail at philip.in-aachen.net>

> Hi,
> I would like to be able to run a shell command like curl and process the
> output in my Haskell program, but I couldn't find anything helpful about it.
> Something like
> main = do
>        args <- getArgs
>        inp <- exec "curl" args
>        putStrLn (processInput inp)
> would be very helpful.
> Regards
> Philip
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080515/294eb003/attachment.htm

More information about the Haskell-Cafe mailing list