Sujet : GNU Awk - inplace editing
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awkDate : 23. May 2025, 06:28:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100p11m$3uh3m$1@dont-email.me>
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
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?)
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.
That's not exactly as simple to use as, say,
gawk -i ...
and
gawk -i.bak
so I suppose there's a reason for the added complexity in the handling.
Does anyone know that reason or remember a rationale? - I don't recall
any discussions about that...
Janis