From: Sebastian Hungerecker Date: 2007-07-20T18:34:36+09:00 Subject: Re: IO.popen - continuous output Andy Koch wrote: > Hi, > > is it possible to get a continuous output stream with IO.popen('xxx') > > example, > > IO.popen('tail -f some_log_file')... > > where the goal is to see the tail output as it's generating, rather than > waiting for the process to complete to dump the generated output. That *is* what you get with IO.popen. For example, IO.popen('tail -f testfile').each_line do |line| puts line.upcase end prints out the upcased version of any line added to testfile as soon as it is added to the file. -- Ist so, weil ist so Bleibt so, weil war so