From: Brian Adkins Date: 2007-11-22T00:20:07+09:00 Subject: Re: Read last line of a file On Nov 19, 9:38 am, Shuaib Zahda wrote: > Hi all > > I was trying to find a method to read only the last line of a file. I > checked the the documentation and there is no such method. > Beside reading line after line and checking the the eof method. Is there > any faster or shorter way to do that. last_line = `tail -n 1 #{file_name}`