From: Robert Klemme Date: 2007-02-22T22:15:06+09:00 Subject: Re: ruby tail This version is safer and a tad more flexible, just in case there is an exception (e.g. because of thread interruption): def tail(file, interval=1) raise "Illegal interval #{interval}" if interval < 0 File.open(file) do |io| loop do while ( line = io.gets ) puts line end # uncomment next to watch what is happening # puts "-" sleep interval end end end Cheers robert