From: Patrick Plattes Date: 2007-02-23T00:22:09+09:00 Subject: Re: ruby tail Phy Prabab schrieb: > Hello, > > 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". > > TIA, > Phy > > > > > > ____________________________________________________________________________________ > Do you Yahoo!? > Everyone is raving about the all-new Yahoo! Mail beta. > http://new.mail.yahoo.com os independent, but slower on large files. a = File.open(file).to_a -10.upto(-1) do |i| puts a[i] end need to be beautified :-)