From: Gavin Sinclair Date: 2003-02-17T10:51:50+09:00 Subject: Re: count lines On Monday, February 17, 2003, 12:44:02 PM, Gustav wrote: > Hi there, > Is there a possibility to count the lines in a file with ruby? count.rb lines = 0 ARGF.each do |line| lines += 1 end Run it as: ruby count.rb file ... Gavin