4

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
josiah
  • 1,314
  • 1
  • 13
  • 33

1 Answers1

1

Are you aware of the existence of inshellWithErr?

gallais
  • 11,823
  • 2
  • 30
  • 63
  • This looks like it would do the job. I was searching around for the 'pipe' keyword and not finding anything. Should have just searched more broadly for stderr. – josiah Aug 01 '17 at 15:05