Sujet : Which, as noted, is ugly and not AWK (Was: A feature I'd like to see in GAWK...)
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.awkDate : 16. Jul 2024, 17:25:28
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <v766to$3hj2q$1@news.xmission.com>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
669683b6$0$713$14726298@news.sunsite.dk>,
Mack The Knife <
mack@the-knife.org> wrote:
While this is interesting, it can actually be done very easily from the
shell level, using process substitution:
>
awk -f foo.awk <(df -l) <(df)
Which, as noted in the OP, is ugly and not AWK, but rather shell.
(As I said, we all know the workarounds - and we all know they are ugly)
And it doesn't work if you have to calculate the value of the process to
run inside the AWK script (which isn't the case with my "df" example, but
is why I used the phrase "not always sufficient").
-- After 4 years of disastrous screwups, Trump now favors 3 policies that I support: 1) $2K/pp stimulus money. Who doesn't want more money? 2) Water pressure. My shower doesn't work very well; I want Donnie to come fix it. 3) Repeal of Section 230. This will lead to the demise of Face/Twit/Gram. Yey!