From: Jeremy Tregunna Date: 2007-06-19T00:47:30+09:00 Subject: Re: backtick vs. system() --Apple-Mail-11--136502091 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed Try using IO#popen instead. -- Jeremy Tregunna jtregunna@blurgle.ca On 18-Jun-07, at 11:20 AM, Peter.Meier998@gmx.de wrote: > Hi, > > I have problems with the difference between the system() call and a > backtick call `command`. > > Everything work fine until I try to redirect the output of the script. > > Ex. > puts `ls` > system('ls') > > A normal run is fine. > The redirected version with test.rb >test.log 2>&1 stops with > "bad file descriptor". > If you try the command independent, you will see that system() causes > the problem. > Any hints? > > I used system, due I can see the output during the run. > With puts `ls` it will be only visible at the end. > > Thanks > Peter > > > > !DSPAM:4676a2c4533981744819530! > --Apple-Mail-11--136502091--