From: Jos Backus Date: 2011-05-13T02:22:58+09:00 Subject: Re: Shell pipeline in Ruby? --000e0cd599cca7b3b604a31770ed Content-Type: text/plain; charset=ISO-8859-1 Have you checked out Open3.pipeline? Jos -- Peace cannot be achieved through violence, it can only be attained through understanding. On May 12, 2011 9:06 AM, "Michal Suchanek" wrote: > Hello, > > how do you write an equivalent of > > $ cmdA | cmdB | cmdC > > in Ruby? > > Specifically, I would like to see the PID, return value and stderr of > each of these commands but I would like cmdB to read the stdout of > cmdA directly, on its stdin, and similarily for cmdC and cmdB. > > Here I am not interested in feeding cmdA some particular input (eg. it > can read /dev/null for all I care) but in general gluing arbitrary fd > to its stdin might be desirable in other cases. > > Thanks > > Michal > --000e0cd599cca7b3b604a31770ed--