From: Rick DeNatale Date: 2010-05-13T02:29:34+09:00 Subject: Re: reading file after a particular line in file On Wed, May 12, 2010 at 1:20 PM, Vandana wrote: > Hello All, > >      I would like to read a file in ruby. It is a 2G file, but > contain useless data in the beginning portion of the file. > > There is a particular pattern towards the middle of the file after > which useful data begins. Is there a way to grep for this pattern and > then read every line henceforth, but ignore all lines previous to line > on which pattern found? Grep is going to have to read the file to find that pattern anyway. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale