From: Michael Furmaniuk Date: 2009-04-02T21:16:31+09:00 Subject: Re: Read and modify logs Srijayanth Sridhar wrote: > One silly way to achieve what you want is to reopen the file for > reading. I wanted to avoid that as I am using this log file to maintain results from other scripts and if the timing goes wrong I might close the file, another opens, then I open it again to erase and lose the latest entry. Mostly I was wondering if there was a way to do this in one operation. > Though, I don't see why you can't maintain a hash of all the lines > instead > of having to remove lines from the log file. Its never a good idea to > muck > about with log files. hmmm...I suppose I could read the file and write out ones I recorded with a notation so I skip those in the future. I'll have to think about that. Thanks -- Posted via http://www.ruby-forum.com/.