Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Understanding the Power of Awk (tonylixu.medium.com)
5 points by xrayarx on June 9, 2024 | hide | past | favorite | 2 comments


The issue with awk is that there are multiple non-interoperable implementations:

https://en.wikipedia.org/wiki/AWK#Versions_and_implementatio...

https://stackoverflow.com/questions/40409632/what-is-the-dif...

This makes awk scripts less portable than other text processing tools.

awk is also not extensible--it can be awkward (heh) to adapt it to some problems and big scripts get difficult to wrangle.

awk is great if your text processing problem is small.

Sometimes small problems grow in which case Perl tends to be a better choice:

https://stackoverflow.com/questions/366980/what-are-the-diff...

https://www.perl.com/article/perl-one-liners-part-2/

People love to hate perl, but there is a reason why it was installed on all Unix and Linux systems by default and was so popular for web servers on the early Internet (e.g. Apache mod_perl and perl mason).





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: