From: Heesob Park Date: 2008-06-04T21:20:02+09:00 Subject: Re: deleting first line from a file Hi, 2008/6/4 suresh : > On Jun 4, 3:19 pm, Heesob Park wrote: >> 2008/6/4 suresh : >> >> >> >> > On Jun 4, 1:48 am, Chris Shea wrote: >> >> On Jun 3, 1:59 pm, suresh wrote: >> >> >> > Hi >> >> >> > I have a HUGE data file multiple lines of data. I want to delete just >> >> > the first line from it. How to do it efficiently? >> >> >> > thanks >> >> > suresh >> >> >> Would this work for you? >> >> >> tail -n +2 original.file > modified.file >> >> >> HTH, >> >> Chris >> >> > Hi >> >> > BTW is there any equivalent method equivalent to linux tail in ruby? >> >> ruby -n -e 'print $_ if $.>1' original.file > modified.file >> >> Regards, >> >> Park Heesob > > Hi Park Heesob > > Thanks. But how can this be done inside a .rb file? The above must be > from command line right? > It is equivalent to while gets print $_ if $.>1 end Regards, Park Heesob