josiah
josiah

Reputation: 1414

How to pipe stdout/stderr to the stdin of another command in Turtle?

The title pretty much says it all, I couldn't locate this answer obviously worded in the docs. I'm also unclear on how one would save-off stdout/stderr in a variable for later use to piping to stdin for multiple commands. Something conceptually like the below where x <- shell a b means getting the stdout from the shell command and storing it in x


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

Upvotes: 4

Views: 203

Answers (1)

gallais
gallais

Reputation: 12103

Are you aware of the existence of inshellWithErr?

Upvotes: 1

Related Questions