Groups | Search | Server Info | Login | Register
Groups > comp.lang.awk > #9971
| Path | csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Kaz Kylheku <643-408-1753@kylheku.com> |
| Newsgroups | comp.lang.awk |
| Subject | Re: GNU Awk - inplace editing |
| Date | Fri, 23 May 2025 08:58:33 -0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 44 |
| Message-ID | <20250523015528.637@kylheku.com> (permalink) |
| References | <100p11m$3uh3m$1@dont-email.me> <100pb7d$3kkjb$1@news.xmission.com> |
| Injection-Date | Fri, 23 May 2025 10:58:34 +0200 (CEST) |
| Injection-Info | dont-email.me; posting-host="cb63dad964590d203f250b2756a461e1"; logging-data="23067"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zAUXDMoepusT8ie9MO7aHf8Jo79c0NyU=" |
| User-Agent | slrn/pre1.0.4-9 (Linux) |
| Cancel-Lock | sha1:Td5GnWX7G77+dsizfeRB0Y+mTjk= |
| Xref | csiph.com comp.lang.awk:9971 |
Show key headers only | View raw
On 2025-05-23, Kenny McCormack <gazelle@shell.xmission.com> wrote: > 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. Sure, but, interestingly, just like Janis, I also seem to have a false, memory of there having been some other inplace mechanism that was replaced by the -i inplace include (not necessarily a -i option). There is no evidence of any such in the available materials, though. We might have both been duped by something unclear someone said once, (perhaps here)? -- TXR Programming Language: http://nongnu.org/txr Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal Mastodon: @Kazinator@mstdn.ca
Back to comp.lang.awk | Previous | Next — Previous in thread | Next in thread | Find similar
GNU Awk - inplace editing Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-05-23 07:28 +0200
Re: GNU Awk - inplace editing Kaz Kylheku <643-408-1753@kylheku.com> - 2025-05-23 06:02 +0000
Re: GNU Awk - inplace editing gazelle@shell.xmission.com (Kenny McCormack) - 2025-05-23 08:22 +0000
Re: GNU Awk - inplace editing Kaz Kylheku <643-408-1753@kylheku.com> - 2025-05-23 08:58 +0000
Re: GNU Awk - inplace editing Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-05-23 16:08 +0200
Re: GNU Awk - inplace editing mack@the-knife.org (Mack The Knife) - 2025-05-25 04:00 +0000
Re: GNU Awk - inplace editing Ed Morton <mortonspam@gmail.com> - 2025-05-25 15:27 -0500
Re: GNU Awk - inplace editing Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-05-26 02:11 +0200
csiph-web