From: Eckard Brauer <eckard.brauer@gmx.de>
To: 9front@9front.org
Subject: Re: [9front] this history(1) is scratched
Date: Sat, 12 Nov 2022 12:03:23 +0100 [thread overview]
Message-ID: <20221112120323.60e54c94@gmx.de> (raw)
In-Reply-To: <9630E999FCA18103578EE0C514F78687@wopr.sciops.net>
> If I understand the intent correctly, then the simplest fix is to add
> the space character to the regex:
>
> ; echo 'a b' | awk '{gsub($1" ", ""); print}'
> b
currently, I don't have a 9front/plan9 available here to check context,
but knowing awk a bit, i'd remark:
* while sub() replaces a single occurenco of 'a' in each input record,
gsub replaces every one. If this is intended in that context, it's
fine.
* you maybe should not add " " to $1, but "[ \t]+", as awk usually
treats each consecutive sequence of whitespace as a field delimiter,
except of course you can be sure that only one single space char will
be there in any case.
next prev parent reply other threads:[~2022-11-12 11:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 8:15 qwx
2022-11-12 11:03 ` Eckard Brauer [this message]
2022-11-12 12:16 ` Eckard Brauer
2022-11-12 18:07 ` Eckard Brauer
2022-11-12 19:13 ` ori
2022-11-12 20:32 ` Eckard Brauer
2022-11-12 20:44 ` Eckard Brauer
2022-11-12 20:53 ` Eckard Brauer
2022-11-12 21:26 ` ori
2022-11-12 22:43 ` umbraticus
2022-11-13 3:35 ` Anthony Martin
2022-11-13 23:20 ` qwx
2022-11-15 11:49 ` qwx
2022-11-15 21:59 ` qwx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221112120323.60e54c94@gmx.de \
--to=eckard.brauer@gmx.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).