From: Chandan Bansal Date: 2011-04-08T14:40:00+09:00 Subject: Re: capture the output of a grandchild Brian Candler wrote in post #991449: > In that case, all you should need is: > > system("/path/to/prog >output.file 2>&1") ya u are right, i tried system("(cd path/to/perl && ./myscript.pl) > output.file 2>&1") the program that i am calling from my ruby script is a perl script but there is one more problem, i am using this ruby script with screens and this system function call just happens to capture output from some other screens as well.. dunno whats the reason.. Thanks, Chandan. -- Posted via http://www.ruby-forum.com/.