suresh
6/4/2008 12:49:00 PM
On Jun 4, 5:20 pm, Heesob Park <pha...@gmail.com> wrote:
> Hi,
>
> 2008/6/4 suresh <suresh.amritap...@gmail.com>:
>
> > On Jun 4, 3:19 pm, Heesob Park <pha...@gmail.com> wrote:
> >> 2008/6/4 suresh <suresh.amritap...@gmail.com>:
>
> >> > On Jun 4, 1:48 am, Chris Shea <cms...@gmail.com> wrote:
> >> >> On Jun 3, 1:59 pm, suresh <suresh.amritap...@gmail.com> 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
Thanks Park Heesob, thank you
suresh