Jonathan Palardy
blog.jpalardy.com · Personal blog · on HN since 2013
Jonathan Palardy writes about command-line tools, especially awk, shell scripting, and small Unix text-processing techniques.
What HN saysHN commenters recommend his awk article as an eye-opening way to understand awk, and link his posts on fish shell and sort/uniq alternatives.
18HN people shared it
4linked it in comments
36stories submitted
958story points
11 months agolast shared
2013people per year2026
Most-shared posts
- 1Why Learn Awk? (2016)4 people · 423 points · first shared 2016 · 235 comments on HN
- 2Solving Problems with MiniZinc3 people · 62 points · first shared 2017 · 15 comments on HN
- 3My Best Awk Tricks3 people · 7 points · first shared 2016 · discussion on HN
- 4Skip grep, use awk2 people · 333 points · first shared 2017 · 130 comments on HN
- 5Statistics: How Many Would You Check?2 people · 8 points · first shared 2015 · 5 comments on HN
- 6Bash Aliases, Functions and Commands2 people · 3 points · first shared 2017 · discussion on HN
- 7How to Shuffle and Sample on the Command-Line1 people · 82 points · first shared 2015 · 20 comments on HN
- 8Wrapping Command-Line Tools1 people · 5 points · first shared 2015 · discussion on HN
- 9Awk Tutorial1 people · 4 points · first shared 2025 · 1 comments on HN
- 10How to cut a rectangle into 3 without a ruler1 people · 4 points · first shared 2025 · discussion on HN
- 11QR Codes on the Command-Line1 people · 3 points · first shared 2019 · discussion on HN
- 12The Partition Problem1 people · 2 points · first shared 2016 · discussion on HN
- 13Dealing with Non-ASCII Characters1 people · 2 points · first shared 2020 · discussion on HN
- 14ISO 8601 and Date Arithmetic on the Command-Line1 people · 2 points · first shared 2018 · discussion on HN
- 15JavaScript tooling: madge1 people · 2 points · first shared 2018 · 1 comments on HN
What HN people wrote when they linked it
Zhyl · 2020-10-30
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
asicsp · 2019-09-29
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
dgunay · 2022-11-16
> 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/
known · 2020-03-30
Can't we do it in AWK
https://blog.jpalardy.com/posts/alternative-to-sort-uniq-c/