【发布时间】:2017-07-31 19:54:46
【问题描述】:
标题几乎说明了一切,我在文档中找不到明显措辞的答案。我也不清楚如何将 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
【问题讨论】: