From: 7stud -- Date: 2007-11-10T06:10:47+09:00 Subject: Re: How to edit a file without loading it all into memory Jonathan Dobbie wrote: > The lines are easy to > find with grep, and I'm able to create the new line easily enough, but > how can I do this without holding the entire file into memory? The > files can be hundreds of megabytes. > File.foreach("data.txt") do |line| #look for something in line end -- Posted via http://www.ruby-forum.com/.