Re: "sed" question

Liste des GroupesRevenir à cl awk 
Sujet : Re: "sed" question
De : gtaylor (at) *nospam* tnetconsulting.net (Grant Taylor)
Groupes : comp.lang.awk
Date : 08. Mar 2024, 16:12:05
Autres entêtes
Organisation : TNet Consulting
Message-ID : <usf9s5$ldr$1@tncsrv09.home.tnetconsulting.net>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
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.
    (NF == 5){print $3}
    (NF == 8){print $4}
Or:
    {total+=$5}
    END{print total}
I usually think of regular expressions when I'm doing a sub(/re/, ...) type thing or a (... ~ /re/) type conditional.  More specifically things between the // in both of those statements are the REs.
Maybe I have an imprecise understanding / definition.
--
Grant. . . .

Date Sujet#  Auteur
8 Mar 24 * Re: "sed" question13Grant Taylor
8 Mar 24 `* Re: "sed" question12Keith Thompson
8 Mar 24  +* Re: "sed" question10Mr. Man-wai Chang
8 Mar 24  i`* Re: "sed" question9Janis Papanagnou
8 Mar 24  i +* Re: "sed" question6Grant Taylor
8 Mar 24  i i+* Re: "sed" question4Mr. Man-wai Chang
12 Mar 24  i ii`* Re: "sed" question3Geoff Clare
12 Mar 24  i ii `* Re: "sed" question2Aharon Robbins
13 Mar 24  i ii  `- Re: "sed" question1Geoff Clare
9 Mar 24  i i`- Re: "sed" question1Janis Papanagnou
8 Mar 24  i `* Re: "sed" question2Mr. Man-wai Chang
9 Mar 24  i  `- Re: "sed" question1Janis Papanagnou
8 Mar 24  `- Re: "sed" question1Kaz Kylheku

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal