From: Sloan Ruby Date: 2013-02-14T08:08:33+09:00 Subject: Re: file size of each item in file list This is what I have now. I am not able to print out each line of the file /tmp/lg_files. There is no output. What am i missing? #!/usr/bin/ruby system('find /var -type f -size +20000 >> /tmp/lg_files') #do this in a block so it closes the file afterwards: File.read("/tmp/lg_files") do |f| contentsArray=[] # start with an empty array f.each_line {|line| #a = contentsArray.push line b = File.size contentsArray.last puts b } end #system('> /tmp/lg_files') -- Posted via http://www.ruby-forum.com/.