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.

That is, I want a function like

  system' :: String -> String -> IO ExitCode

such that

  system' cmd inp

would be equivalent to first writing inp to a file, say "temp", and then
calling

  system (cmd ++ " < temp")

Of course, without actually creating that temporary file and having to
clean it up afterwards.

Does such a system' exist?

Thanks, Janis.

--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:[EMAIL PROTECTED]


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to