2017-07-31 44 views
3

標題幾乎說明了一切,我找不到這個答案顯然措辭在文檔。我還不清楚如何將stdout/stderr保存在一個變量中,以便稍後用於爲多個命令管道化stdin。概念上的東西像下面的地方x <- shell a b手段shell命令獲取標準輸出並將其存儲在x如何將stdout/stderr傳遞給Turtle中另一個命令的stdin?


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

回答

1

你知道的inshellWithErr的存在?

+0

這看起來好像會完成這項工作。我正在四處搜尋「管道」關鍵字,但沒有發現任何內容。應該更廣泛地搜索stderr。 – josiah

相關問題