From: Dan Bikle Date: 2006-10-27T12:02:31+09:00 Subject: Re: backtick commands and stderr ------=_Part_49176_632236.1161918147642 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Which shell is ruby using? Can I control which shell ruby is using? -Dan On 10/26/06, Wilson Bilkovich wrote: > > On 10/26/06, Alexandru Popescu > wrote: > > Hi! > > > > When executing a system op using the backtick method, the standard > > output is caught and returned in the assigned variable: > > > > output= `ls -Al` > > > > I am wondering what happens with the standard error output? I have > > written a script that executes well in the happy path scenario, but > > for the case where the invoked system tool is writting to stderr I > > have no idea how to trap that. > > > > Any help and ideas are highly appreciated, > > Since it's a system command, you can ask it to redirect stderr to stdout: > > output = `ls -Al 2>&1` > > -- bikle@bikle.com http://bikle.com ------=_Part_49176_632236.1161918147642--