Re: Reading last 10 lines in file on Win32 Systems

2005-04-19 Thread Offer Kaye
On 4/19/05, Dave Adams wrote: > I have a 2 gig log file and I need to read only the last 10 lines. > > I was also thinking something like: > > 1. Read in File > 2. Get number of lines > 3. Print last ten lines > > or something like that. > On a 2gig file, that is very inefficient. Much better

RE: Reading last 10 lines in file on Win32 Systems

2005-04-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Dave Adams wrote: > I have a 2 gig log file and I need to read only the last 10 lines. > > I was also thinking something like: > > 1. Read in File > 2. Get number of lines > 3. Print last ten lines > > or something like that. > > DA > You may want to think this out in that you want to

Re: Reading last 10 lines in file on Win32 Systems

2005-04-19 Thread Dave Adams
I have a 2 gig log file and I need to read only the last 10 lines. I was also thinking something like: 1. Read in File 2. Get number of lines 3. Print last ten lines or something like that. DA On 4/19/05, Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: > Dave Ada

RE: Reading last 10 lines in file on Win32 Systems

2005-04-19 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Dave Adams wrote: > I am new to PERL but how would I write a script that would read in a > file and output the last 10 lines? > > I guess it is sort of like the UNIX command of Tail. > > Any ideas, much appreciated. > > DA I did a cpan search and got File::ReadBackwards . What type of

Reading last 10 lines in file on Win32 Systems

2005-04-19 Thread Dave Adams
I am new to PERL but how would I write a script that would read in a file and output the last 10 lines? I guess it is sort of like the UNIX command of Tail. Any ideas, much appreciated. DA -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]