bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] gawk - 'inplace' feature ignores file's access flags (rea


From: Andrew J. Schorr
Subject: Re: [bug-gawk] gawk - 'inplace' feature ignores file's access flags (read-only)
Date: Mon, 15 Jun 2015 08:57:15 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Jun 15, 2015 at 12:09:21PM +0200, Nethox wrote:
> On Mon, Jun 15, 2015 at 9:31 AM, Johannes Meixner wrote:
> 
> > I am not a native English speaker but as far as I understand
> > https://en.wikipedia.org/wiki/In_situ
> > "in situ" also means "in place".
> 
> 
> Yes, I inserted that parenthesis afterwards in the wrong place. I wanted to
> say:
> I think this feature should be called "replace editing" instead of
> "in-place editing" (or "in situ").
> Based on this concept: https://en.wikipedia.org/wiki/In-place_algorithm
> "In computer science, an in-place algorithm (or in Latin in situ) is an
> algorithm which transforms input using a data structure with a small,
> constant amount of extra storage space. The input is usually overwritten by
> the output as the algorithm executes. An algorithm which is not in-place is
> sometimes called not-in-place or out-of-place (or ex situ in Latin)."

I agree that "in place" is not technically accurate, but it is the current
standard for how to name such a feature:

bash-4.2$ sed --help | grep place
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)

bash-4.2$ perl  --help | grep place
  -i[extension]     edit <> files in place (makes backup if extension supplied)

The point of this extension is to provide similar functionality for gawk.
As such, it makes sense to name it similarly so that people will recognize
what it's trying to do.

Regards,
Andy



reply via email to

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