Jonathan Palardy writes about command-line tools, especially awk, shell scripting, and small Unix text-processing techniques.
HN commenters recommend his awk article as an eye-opening way to understand awk, and link his posts on fish shell and sort/uniq alternatives.
Reminds me of a similar article [1]
Once you get a hang of how shell constructs like pipes, redirections, globs, variable/command substitutions, etc, the various cli text processing tools like grep, sed, awk, perl, sort, tr, pr, paste, etc are worth to learn at least the basics. They have been through years of use and heavily optimized for performance. Just today, a friend of mine called to ask how to improve a Python script's performance for 5-10 MB text file. After confirming he isn't using any other special modules, I advised to check if the performance improves by implementing it using awk.
If anyone's interested in examples based tutorials on cli text processing tools, check out my github repo [2]
[1] https://blog.jpalardy.com/posts/why-learn-awk/
[2] https://github.com/learnbyexample/Command-line-text-processing
I always link to this blog post [0] by Jonathan Palardy. It was one of those eye opening articles for me that really helped me 'grok' it - and this is after having had a couple of stabs at learning it just from reading the text books on it.
Awk for me is part of the layers of tools from grep/sed -> AWK -> perl one liner -> full on script. The further down the ladder you go, the more restricted you are, but this means that programs are terser and usually stay readable despite the terseness.
I would also recommend Perl One liners [1] which did the same thing for me for Perl one liners and, subsequently, full Perl.
[0] https://blog.jpalardy.com/posts/why-learn-awk/
[1] https://nostarch.com/perloneliners
> can fish shell show inline docs
Yes, it can. It's not the full docs of course, but tab completion for flags often comes with a one liner about what it does from the docs [1].
[1]: https://blog.jpalardy.com/posts/fish-shell-is-awesome/
Can't we do it in AWK
https://blog.jpalardy.com/posts/alternative-to-sort-uniq-c/