# Re: ruby tail

**URL:** <https://www.ruby-forum.com/t/re-ruby-tail/86452>\
**Category:** Ruby\
**Created:** [February 22, 2007, 11:24am UTC](https://www.ruby-forum.com/t/re-ruby-tail/86452 "2007-02-22T11:24:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phy\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a587f6/32.png) [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Post date:** [February 22, 2007, 11:24am UTC](https://www.ruby-forum.com/t/re-ruby-tail/86452/1 "2007-02-22T11:24:10Z")

</div>

Benj,

how would that work?

TIA,  
Phy

----- Original Message ----  
From: “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: ruby-talk ML [removed\_email\_address@domain.invalid](mailto: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
