Bernhard 'elven' Stoeckner
5/24/2006 3:41:00 PM
jvivenot scribbled on Wednesday 24 May 2006 17:37, fup2
<1148485072.662376.323810@j55g2000cwa.googlegroups.com>:
> Hi,
>
> In a Gnome Ruby application, I want to display the output of a bash
> command during its own execution, instead of after it finished.
> In order to do this, I used :
> io = IO::popen(...)
> io.each_line {
>
> }
>
> But this displays the output after the command returned. How could I do
> ? (my command takes several minutes, and displays things every two
> seconds, that's why I can't wait...)
>
> Thanks.
> (I hope my english is understandable.)
IO#gets() does what you want to achieve. :)