Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Ed Morton Newsgroups: comp.lang.awk Subject: Re: GNU Awk - inplace editing Date: Sun, 25 May 2025 15:27:27 -0500 Organization: A noiseless patient Spider Lines: 25 Message-ID: <100vuff$1i1nb$1@dont-email.me> References: <100p11m$3uh3m$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 25 May 2025 22:27:27 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8ab007d66806dd93444c23bf354b43f2"; logging-data="1640171"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19dHKHKXg3xEfIaBjRxYTRI" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:suqkkyqQa9aTV1w3L8Ry0hzRrV0= In-Reply-To: <100p11m$3uh3m$1@dont-email.me> X-Antivirus-Status: Clean X-Antivirus: Avast (VPS 250525-0, 5/24/2025), Outbound message Content-Language: en-US Xref: csiph.com comp.lang.awk:9974 On 5/23/2025 12:28 AM, Janis Papanagnou 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?) > > 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... The somewhat lengthy discussion at https://lists.gnu.org/archive/html/bug-gawk/2012-12/msg00046.html may (or may not) be useful. Ed.