如何将stdout / stderr传递给Turtle中另一个命令的stdin?

时间:2017-07-31 19:54:46

标签: haskell haskell-turtle

标题几乎说明了一切,我无法在文档中找到明显措辞的答案。我也不清楚如何将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

1 个答案:

答案 0 :(得分:1)

您是否知道inshellWithErr的存在?

相关问题