Re: A feature I'd like to see in GAWK...

Liste des GroupesRevenir à cl awk 
Sujet : Re: A feature I'd like to see in GAWK...
De : jbrubake.362 (at) *nospam* orionarts.invalid (Jeremy Brubaker)
Groupes : comp.lang.awk
Date : 19. Jul 2024, 15:26:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v7dt2r$3147j$1@dont-email.me>
References : 1
User-Agent : slrn/1.0.3 (Linux)
On 2024-07-15, Kenny McCormack wrote:
As we know, AWK in general, and GAWK in particular, has several different
ways of getting data into the program.  In addition to the Automatic Input
Loop (the main feature of AWK), there are several variations of "getline".
>
"getline" can be used with files, or with processes (in 2 different ways!),
or even with network sockets.  But the problem with getline is that using
it breaks the Automatic Input Loop.  You can't use the standard
"pattern/action" paradigm if your input is coming in via "getline".  Yes,
there are workarounds and yes we've all gotten used to it, but it is a
shame.  For one thing, you can write your program as a shell script, and
use the shell to pipe in the data from a process.  But this is ugly.  And
not always sufficient.
>
Now, I have written a GAWK extension to handle this - called
"pipeline".

That sounds quite useful. I am fairly certain I have wished a feature
like that existed and ended up just wrapping awk with sh but I agree
that's ugly.

Awk is underrated IMHO. Not that json/yaml/etc aren't useful things but
frequently when I seem them used my first thought is "If you had just
done well-formatted text records I could have parsed this with awk".

-- () www.asciiribbon.org  | Jeremy Brubaker /\  - against html mail |
јЬruЬаkе@оrіоnаrtѕ.іо / neonrex on IRC

Even a hawk is an eagle among crows.

Date Sujet#  Auteur
15 Jul 24 * A feature I'd like to see in GAWK...7Kenny McCormack
16 Jul 24 +* Re: A feature I'd like to see in GAWK...2Mack The Knife
16 Jul 24 i`- Which, as noted, is ugly and not AWK (Was: A feature I'd like to see in GAWK...)1Kenny McCormack
16 Jul 24 +- Re: A feature I'd like to see in GAWK...1Kaz Kylheku
16 Jul 24 +* Re: A feature I'd like to see in GAWK...2Arti F. Idiot
17 Jul 24 i`- Re: A feature I'd like to see in GAWK...1Kenny McCormack
19 Jul 24 `- Re: A feature I'd like to see in GAWK...1Jeremy Brubaker

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal