Re:Ask HN: Should I learn Awk or Perl? Or is that a bad ques...
by AnthOlei on Thursday July 04, 2024 @12:49PM
(#40876303)
Oh wow. I went though some of the perl book you linked and I was noticing the examples were really familiar; I then realized you were the same guy who wrote the awk book I have been going though.
Your work is excellent! Thank you, I’ll buy a copy soon.
I have written a book on Perl one-liners with plenty of examples and exercises [0]. I've also written books on CLI text processing tools like grep, sed, awk and coreutils [1]. If you prefer just solving exercises, check out my interactive TUI apps [2].
>Is awk just better for this use case?
It depends on the kind of tasks you'd need to solve. I generally prefer grep, sed and awk first. Perl helps if I need powerful regexp and other niceties like the huge number of built-in functions and access to third-party libraries.
[0] https://learnbyexample.github.io/learn_perl_oneliners/
[1] https://github.com/learnbyexample/scripting_course#ebooks
[2] https://github.com/learnbyexample/TUI-apps