
23 Sep
2008
23 Sep
'08
11:55 a.m.
On Tue, Sep 23, 2008 at 01:37:56PM +0200, Janis Voigtlaender wrote:
Hi,
assume I have a program taking input from stdin. How do I call it from Haskell while feeding to it a string as input.
Sure, have a look at http://hackage.haskell.org/packages/archive/process/1.0.0.0/doc/html/System-... rnuInteractiveCommand does would you want (in,out,err,pId) <- runInteractiveProcess "cat" ... hPutStrLn "test" in hClose in outContents <- hGetContents out print outContents or such Marc