标题几乎说明了一切,我找不到文档中明确措辞的答案。我也不清楚如何将 stdout/stderr 保存在变量中,以便以后用于通过管道传输到 stdin 来执行多个命令。从概念上讲,类似于下面的内容,其中 x <- shell a b
意味着从 shell 命令获取 stdout 并将其存储在 x
中
pipeThings = do
c1out <- shell "some-cmd" empty
... do some things
c1out `pipe` shell "another-cmd" empty
c1out `pipe` shell "yet-another-cmd" empty
最佳答案
你知道inshellWithErr
的存在吗? ?
关于haskell - 如何将 stdout/stderr 通过管道传输到 Turtle 中另一个命令的 stdin?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45424273/