Sujet : Re: "sed" question
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awkDate : 09. Mar 2024, 03:07:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <usgg8t$20kn1$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 08.03.2024 16:12, Grant Taylor wrote:
On 3/8/24 08:46, Janis Papanagnou wrote:
Awk without regexps makes little sense;
I think this comes down to what is a regular expression and what is not
a regular expression.
mind that the basic syntax of Awk programs is described as
pattern { action }
I'm guessing that 40-60% of the awk that I use doesn't use what I would
consider to be regular expressions.
[...]
Maybe I have an imprecise understanding / definition.
Your definition matches the common naming, where I deliberately
deviate from. (I think that "pattern" is an inferior naming and
"condition" should better be used, where a 'condition' can also
be a regexp that I regularly write as '/regexp/' or '/pattern/'
in explanations.) So I agree that it's likely that this alone
doesn't serve well as explanation for the existence of regexps
in Awk. The rationale is better seen in the statement "Awk was
designed to see how Sed and Grep could be generalized." that I
quoted (not literally, but from the original Awk book).
Janis