Re: ruby tail


#1

Benj,

how would that work?

TIA,
Phy

----- Original Message ----
From: “removed_email_address@domain.invalid” 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
Kernel.select on a bunch of those handles?

Cheers,
Benj