[Haskell-beginners] Invoke an external command

Hong Yang hyangfji at gmail.com
Sat Jul 24 10:55:41 EDT 2010


Hi,

I am trying to pass on arguments and standard input to an external command,
and get back its standard output real time.

I used "readProcess" from "System.Process" module. It is working fine except
that the output is returned strictly, i.e., the output was dumped to the
screen all at once when the command was finished.

I also tried HSH module and it acted the same as readProcess:
runIO $ setenv [("TERM", standard_input)] $ "echo $TERM" -|- (command ++ " "
++ (intercalate " " argsListOfStrings)).

Can anyone help me?

Thanks,

Hong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20100724/2b2b357f/attachment.html


More information about the Beginners mailing list