bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] in-place edit request


From: Andrew J. Schorr
Subject: Re: [bug-gawk] in-place edit request
Date: Mon, 31 Dec 2012 12:30:08 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Ed,

On Mon, Dec 31, 2012 at 11:20:19AM -0600, Ed Morton wrote:
> This "extension" stuff - where can I find out more about it? I found
> http://www.gnu.org/software/gawk/manual/gawk.html#Dynamic-Extensions
> but it doesn't mention "-i" so I'm not sure if that's the right
> "extension"s we're talking about.

There is not yet an official release with the upgraded extension functionality.
If you'd like to play with the development version (in the git master branch),
you can grab the gawk-4.0.71 tarball from here:
   http://sourceforge.net/projects/gawkextlib/files/

> Would users need to compile gawk in some specific way (or otherwise
> have to do something they don't normally do) to be able to use the
> in place editing functionality if it was provided by "extension"s or
> would we just get it for no additional effort when we download the
> gawk version that has it?

No additional effort will be required.  It will be bundled with the release.
However, somebody still needs to implement the "inplace" extension.  I may
do it if/when I have some free time to play with this.  The mailing list
now has sufficient notes on how to implement this extension.

> I get my gawk from cygwin or from our IT
> guys at work just installing the latest version occasionally, I
> never have to compile it myself.

This feature has not yet been released.  I'm not sure how long it will
take for cygwin to upgrade their release once it's out.  I think Arnold
mentioned possibly releasing this new version in 4 or 5 months.

> >>>There is nothing stopping anyone from writing a one line wrapper:
> >>>
> >>>   $ cat aip       # Awk In Place
> >>>   #! /bin/sh
> >>>   exec gawk -i inplace "$@"
> >Or one could name this script "gawki" if you'd like.  Or gawk-i.
> >
> >Is it really worth bringing this feature into the main binary for the
> >sake of having a space between "gawk" and "-i"?
> Not sure I understand the question. We're discussing the difference
> to the user between "gawk -i inplace" and "gawk -I" (or similar) not
> the difference between "gawk -i" and "gawki".

I'm simply saying that one could have a wrapper script named "gawk-i" or
"awk-i" (implemented the same way as "aip" above).  I'm asking whether we
should bother to patch the main gawk code to add this feature so that the user
is able to say "awk -I" instead of using a wrapper script "awk-i".  Is it
really important enough to hack up the main code so you can say "awk -i"
instead of "awk-i"?

Regards,
Andy



reply via email to

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