[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] enhancement: fixed-width record
From: |
arnold |
Subject: |
Re: [bug-gawk] enhancement: fixed-width record |
Date: |
Wed, 25 Sep 2019 11:24:52 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
I agree with Andy; an extension is the way to go.
If you really need such a feature and are incapable of writing it
yourself, then we can discuss my consulting rates off-list.
Thanks,
Arnold
"Andrew J. Schorr" <address@hidden> wrote:
> Hi,
>
> On Fri, Sep 20, 2019 at 08:28:30PM +0800, jamesfengcao via bug-gawk wrote:
> > It appears not too complicated to add fixed-width record support. With
> > this support, the GNU awk can be used to handle most cases of binary files.
> >
> > One such case is to handling binary files with strings mixed with binary
> > data. Usually these binary data are fixed-width. We can easily split the
> > file to text file with strings and pure binary file using tools like bbe.
> > Using gawk with fixed-width record support, we can easily sort the original
> > mixed binary file.
> >
> > In fact, with this enhancement, gawk is automatically extended to be a
> > very powerful tool for binary data processing. In fact, it can handle
> > almost all cases. And the best thing is that it is almost free.
>
> I think this can implemented as a gawk extension library that registers an
> input parser. The documentation is here:
>
> https://www.gnu.org/software/gawk/manual/html_node/Input-Parsers.html
>
> If you develop such an extension, please consider contributing it
> to the gawkextlib project.
>
> Regards,
> Andy