From: Robert Klemme Date: 2011-02-10T22:38:50+09:00 Subject: Re: System calls with ` in parameters On Thu, Feb 10, 2011 at 11:21 AM, Tanaka Akira wrote: > 2011/2/10 Gerad S. : >> >> `echo "#{someVar}" | ./some-script.py > "#{outputFile}"` > > If you use Ruby 1.9.2, Open3.pipline() provides a way to run a pipline > without shell. > > % ruby -ropen3 -e 'Open3.pipeline(["echo", "foo`bar`baz"], ["head", > "-6c", :out => "/tmp/qux"])' > % od -c /tmp/qux > 0000000   f   o   o   `   b   a > 0000006 Cool! Thanks for sharing. Is there also a version which would return an IO or accept a block with IO parameter so we can feed something into the head of the pipeline and read from the tail? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/