From: "Marvin Gülker" Date: 2009-12-14T04:34:20+09:00 Subject: Re: getting shell output Matt Harrison wrote: > I appears that dump writes all of its status output to stderr, and I can > redirect that on the command line using "2>&1" to get it into a file. > I'm > unable however to find something similar for ruby. > > I've tried backticks (``), %x{}. system() and exec() as well as > IO.popen() > but they all fail to intercept the stderr output. I've even tried adding > "2>&1" to the command but it makes no difference. Try open3 from the stdlib: -------------------------- require "open3" Open3.popen3("command") do |stdin, stdout, stderr| #Your code... end --------------------------- Marvin -- Posted via http://www.ruby-forum.com/.