Hacker News new | ask | show | jobs
by em500 2313 days ago
> But I wouldn't recommend python as a good one-liner language. So the question remains, what is awk particularly good at?

Processing regular (i.e. machine-, not human-generated) tabular text files line by line. If you already know Python there are probably few reasons to learn awk.

One of those could be working in constrained environments where you have awk but no Python. Awk is part of POSIX and part of Busybox, so there are almost no environments which have a working Python installed but no Awk, while the reverse is common enough (e.g. embedded systems). Apple plans to remove Python, Perl and Ruby from the default MacOS install in the next version, but probably not Awk (POSIX).

1 comments

Good answers.

(And I hadn't realized Apple was planning on getting rid of Python, Perl, and Ruby from default installs! Wow.)