# Re: Prcoessing outoput from tail

**URL:** <https://www.ruby-forum.com/t/re-prcoessing-outoput-from-tail/90013>\
**Category:** Ruby\
**Created:** [March 24, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/re-prcoessing-outoput-from-tail/90013 "2007-03-24T23:55:07Z")\
**Posts on this page:** 2\
**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:** [March 24, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/re-prcoessing-outoput-from-tail/90013/1 "2007-03-24T23:55:07Z")

</div>

Cool, thanks I will check this out. In the mean time I think I figured  
out a work around, the only problem left is to figure out how to make  
this thread-able:

IO.popen(‘tail -F foo.txt’) {|file|  
while line = file.gets  
puts line  
end  
}

The “while line” was what helped and I even tried the file rolling and  
tail complained but picked up the new file, so ijust need to process  
that error. Do you see any advantage using this over the gem (this way  
I don’t have to make everyone download the gem as well).

TIA!  
Phy

----- Original Message ----  
From: Gustav P. [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: Saturday, March 24, 2007 3:41:12 PM  
Subject: Re: Prcoessing outoput from tail

Phy P. wrote:

> * * *
> 
> Now that’s room service! Choose from over 150,000 hotels  
> in 45,000 destinations on Yahoo! Travel to find your fit.  
> [http://farechase.yahoo.com/promo-generic-14795097](http://farechase.yahoo.com/promo-generic-14795097)

Check out the file-tail gem:

[http://file-tail.rubyforge.org/](http://file-tail.rubyforge.org/)

Cheery-o,  
Gustav P.

---

<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:** [March 25, 2007, 12:45am UTC](https://www.ruby-forum.com/t/re-prcoessing-outoput-from-tail/90013/2 "2007-03-25T00:45:09Z")

</div>

Phy P. wrote:

> TIA!  
> Phy

Great! Looks like that works fine. I haven’t used the file-tail gem,  
just remember having seen it somewhere a while ago, so I can’t give you  
much feedback on it. You mention making the code ‘thread-able’…what do  
you mean exactly?

Gustav
