On Nov 19, 9:38 am, Shuaib Zahda <shuaib.za... / gmail.com> 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}`