From: Jeremy Bopp Date: 2010-12-30T03:31:58+09:00 Subject: Re: platform independent piped input stream from system call On 12/29/2010 12:10 PM, Danny Challis wrote: > Hi all, > I want to get an input stream from a system command in this manner: > > f = open("|ls") > while( [not end of output] ) > f.gets > end > > but I would like it to be platform independent. The output of the > command I'll be using is massive (hundreds of GB) so I cannot load to > memory or write to a temp file. Is there a good platform-independent way > to do this? Check out IO.popen: http://rdoc.info/stdlib/core/1.9.2/IO.popen -Jeremy