Groups | Search | Server Info | Login | Register
Groups > comp.lang.awk > #9785
| From | Jeremy Brubaker <jbrubake.362@orionarts.invalid> |
|---|---|
| Newsgroups | comp.lang.awk |
| Subject | Re: A feature I'd like to see in GAWK... |
| Date | 2024-07-19 14:26 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <v7dt2r$3147j$1@dont-email.me> (permalink) |
| References | <v73pof$3gdp5$2@news.xmission.com> |
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.
Back to comp.lang.awk | Previous | Next — Previous in thread | Find similar
A feature I'd like to see in GAWK... gazelle@shell.xmission.com (Kenny McCormack) - 2024-07-15 18:28 +0000
Re: A feature I'd like to see in GAWK... Mack The Knife <mack@the-knife.org> - 2024-07-16 14:29 +0000
Which, as noted, is ugly and not AWK (Was: A feature I'd like to see in GAWK...) gazelle@shell.xmission.com (Kenny McCormack) - 2024-07-16 16:25 +0000
Re: A feature I'd like to see in GAWK... Kaz Kylheku <643-408-1753@kylheku.com> - 2024-07-16 17:10 +0000
Re: A feature I'd like to see in GAWK... "Arti F. Idiot" <addr@is.invalid> - 2024-07-16 14:05 -0600
Re: A feature I'd like to see in GAWK... gazelle@shell.xmission.com (Kenny McCormack) - 2024-07-17 12:23 +0000
Re: A feature I'd like to see in GAWK... Jeremy Brubaker <jbrubake.362@orionarts.invalid> - 2024-07-19 14:26 +0000
csiph-web