Re:Perl first commit: a “replacement” for Awk and sed
by sidlls on Saturday July 08, 2023 @09:18PM
(#36650493)
awk is a fantastic command line application that is useful for filtering, basic computations and transformations that other basic utilities (e.g. cut, sort, etc.) + grep don't (readily/easily) provide. I suppose it might be a bit archaic these days, but for someone familiar with it, it's often faster to compose an awk command than to write even a very quick/short script in, e.g., python or perl, for certain things.
[ Parent
| on HN ]
Re:Perl first commit: a “replacement” for Awk and sed
by fuzztester on Sunday July 09, 2023 @03:29AM
(#36652422)
>awk is a fantastic command line application that is useful for filtering, basic computations and transformations that other basic utilities (e.g. cut, sort, etc.) + grep don't (readily/easily) provide.
All true.
But awk is also a programming language, not just a command line application or utility.
It has conditionals, loops, regexes, file handling, string handling, (limited) user-definable functions, hashes (associative arrays), reporting abilities and more.
In fact, the name of the original book about awk is The Awk Programming Language.
Re:Perl first commit: a “replacement” for Awk and sed
by tharne on Sunday July 09, 2023 @10:03AM
(#36654513)
> In fact, the name of the original book about awk is The Awk Programming Language.
Great book. I read it after it was so enthusiastically endorsed here on HN. A lot of people said it was worth reading just to take in the excellent technical writing style of Brian Kernighan.
I would offer a strong second to that.
Re:Perl first commit: a “replacement” for Awk and sed
by fuzztester on Sunday July 09, 2023 @03:00PM
(#36657718)
Cool. Yes, his style is good in his other books too, like K&R (C), K&P (Unix), and GOPL (Go), and The Practice of Programming.