Actually, I am not sure how this would work. If I do this, I get no
output from the file:
tail -f sim.out
So there is something basic I am missing here. Any help?
TIA,
Phy
----- Original Message ----
From: Kevin J. [email protected]
To: ruby-talk ML [email protected]
Sent: Thursday, February 22, 2007 1:33:19 AM
Subject: Re: ruby tail
Is there a gem or perhaps a method I am not aware of that does the similar function of tail? Or is there a way to use tail in ruby? I have a file that I want to process as new data is appended to the file. This is easy enough using tail and tail has the added advantage that it can follow a file if it is “rolled”.
Actually, I am not sure how this would work. If I do this, I get no output from the file:
tail -f sim.out
So there is something basic I am missing here. Any help?
it shells out to the process and waits for it to return - with -f does
tail ever return? if not you may not be able to use it - AFAIK ` and
exec are the same - someone with better ruby knowledge may be able to
offer a solution - perhaps using threads or something