4

标题几乎说明了一切,我在文档中找不到明显措辞的答案。我也不清楚如何将 stdout/stderr 保存在一个变量中,以便以后用于管道到 stdin 以获取多个命令。概念上类似于下面的东西x <- shell a b意味着从 shell 命令获取标准输出并将其存储在x


pipeThings = do
  c1out <- shell "some-cmd" empty
  ... do some things
  c1out `pipe` shell "another-cmd" empty
  c1out `pipe` shell "yet-another-cmd" empty
4

1 回答 1

1

你知道 的存在inshellWithErr吗?

于 2017-08-01T12:29:43.807 回答