From: Tim Hammerquist Date: 2002-03-31T09:47:44+09:00 Subject: Re: UNIX tail command Filip Moens graced us by uttering: > I came across a Ruby implementation of the UNIX "tail" command some time > ago, but I can't find it anymore (what's new?). > Can anyone help me on this one? > > Thanks in advance. Searching google for 'Ruby tail script' eventually turned up the following url: http://homepage1.nifty.com/~tetsu/ruby/learn/tail.html ....where I found the attached script halfway down the page. I've had no time to look over the script, but the following usage works: $ tail.rb -N filename ....where (N = {number of lines returned}). eg: `tail.rb -20 ~/.vimrc` returns the last 20 lines of ~/.vimrc, and `tail.rb -1 ~/.gvimrc` returns the final line of ~/.gvimrc. You might also find a Perl implementation of tail(1) at http://www.perl.com/language/ppt/ and try converting it to Ruby. HTH, Tim Hammerquist -- Anyway, comdemning her to an eternity in Hell, just because she turned you down... That's a really shitty thing to do. -- Death, The Sandman