Forum: Ruby Re: ruby tail

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Phy P. (Guest)
on 2007-02-22 12:24
(Received via mailing list)

how would that work?


----- Original Message ----
From: "removed_email_address@domain.invalid" 
To: ruby-talk ML <removed_email_address@domain.invalid>
Sent: Thursday, February 22, 2007 2:05:06 AM
Subject: Re: ruby tail

>> exec are the same - someone with better ruby knowledge may be able to
>> offer a solution - perhaps using threads or something
> Use IO.popen:
> IO.popen('tail -f sim.out'){|f|
>     while line = f.gets
>         p line
>     end
> }

Out of interest, the blocking call is "gets" here, right? Can you use on a bunch of those handles?

This topic is locked and can not be replied to.