From: Ronald Fischer Date: 2007-08-24T17:21:58+09:00 Subject: Re: # of lines in a file > > if on unix: > > `wc -l #{filename}` or similar (I don't remember the exact > syntax for wc) > > Your use of syntax is correct, there. The -l option tells wc to only > report the number of lines. Nearly correct. It also prints out the filename. A better approach when calling from Ruby would be linecount=`wc -l <#{filename}`.chomp.to_i -- Ronald Fischer Phone: +49-89-452133-162