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

The title pretty much says it all, I couldn't find this answer explicitly stated in the docs. I also do not understand how one could save stdout / stderr in a variable for later use to connect to stdin for multiple commands. Something conceptually like below where x <- shell a b

means getting stdout from a shell command and saving it tox


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

      

+3


source to share


1 answer


Are you aware of existence inshellWithErr

?



+1


source







All Articles