[Haskell-cafe] "piping" to system call
voigt at tcs.inf.tu-dresden.de
Tue Sep 23 07:37:56 EDT 2008
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
system' cmd inp
would be equivalent to first writing inp to a file, say "temp", and then
system (cmd ++ " < temp")
Of course, without actually creating that temporary file and having to
clean it up afterwards.
Does such a system' exist?
Dr. Janis Voigtlaender
mailto:voigt at tcs.inf.tu-dresden.de
More information about the Haskell-Cafe