Sujet : Re: GNU Awk - inplace editing
De : mack (at) *nospam* the-knife.org (Mack The Knife)
Groupes : comp.lang.awkDate : 25. May 2025, 05:00:02
Autres entêtes
Organisation : Knife Sharpeners, Inc.
Message-ID : <683295c2$0$687$14726298@news.sunsite.dk>
References : 1
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
100p11m$3uh3m$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> wrote:
In GNU Awk I was looking for the in-place option (similar to sed -i).
I thought there once was some _simple_ option usable from the command
line. (Or am I misremembering?)
You are misremembering.
The manual now suggests to use a GNU Awk "inplace" _Extension_ for that
gawk -i inplace ...
and
gawk -i inplace -v inplace::suffix=.bak ...
respectively.
....
Does anyone know that reason or remember a rationale? - I don't recall
any discussions about that...
It was done with an extension because the maintainer saw no
reason to add Yet Another Option and Still More Code That Would
See Very Little Use into the main core of gawk.