[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] fseek and ftell abilities for GAWK

From: Arnold Robbins
Subject: Re: [bug-gawk] fseek and ftell abilities for GAWK
Date: Thu, 05 Jan 2017 21:04:43 +0200
User-agent: Heirloom mailx 12.5 6/20/10


Thank you for your note.

I have no plans to implement fseek and ftell.  Gawk does its own I/O
buffering for input files, and implementing fseek and ftell would require
quite a lot of work; they would not be wrappers around the C functions.

I am curious as to what your definition of "large" is.  On modern systems
with many GB of RAM, maybe you could just suck your files into memory
and work with them that way?

If you were willing to write an extension that did I/O as a wrapper
around stdio, you might could then build fseek and ftell on top of it,
but you'd end up reinventing a lot of the code that's already inside gawk.



> From: Marc de Bourget <address@hidden>
> Date: Thu, 5 Jan 2017 16:53:08 +0100
> To: address@hidden
> Subject: [bug-gawk] fseek and ftell abilities for GAWK
> Compared to TAWK, I miss one thing most: fseek and ftell.
> I need it often because I have to deal with very big files.
> With TAWK, I can create hashes with the line numbers as key
> and the ftell value of the start of this line as value and
> then jump easily later to this line saving memory and time.
> Are there plans to implement it? Thank you.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]