| Deutsch English Français Italiano |
|
<100pb7d$3kkjb$1@news.xmission.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail From: gazelle@shell.xmission.com (Kenny McCormack) Newsgroups: comp.lang.awk Subject: Re: GNU Awk - inplace editing Date: Fri, 23 May 2025 08:22:05 -0000 (UTC) Organization: The official candy of the new Millennium Message-ID: <100pb7d$3kkjb$1@news.xmission.com> References: <100p11m$3uh3m$1@dont-email.me> Injection-Date: Fri, 23 May 2025 08:22:05 -0000 (UTC) Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4"; logging-data="3822187"; mail-complaints-to="abuse@xmission.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: gazelle@shell.xmission.com (Kenny McCormack) 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?) > >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... I've explained this a few times over the years (in this newsgroup). There was never a "-i" option in Gawk that meant "inplace" (and there never will be). The key to understanding this is to understand that (in Gawk), the "i" in "-i" does not stand for "inplace". It stands for "include". Once you understand that, all becomes clear. -- Senator Marsha Blackburn (R-TN), who sits on the Judiciary Committee, said it was "extremely inappropriate" for the president to nominate a Supreme Court justice on a day ending with the letter "Y", and she said that "Biden is putting the demands of the radical progressive left ahead of what is best for our nation."