4 ms·
Kernighan’s recent memoir has made awk pop in my head a lot more recently and allowed me to stay in shell script land vs bailing to Python. I used it plenty ov
by salmo 6y ago
Kernighan’s recent memoir has made awk pop in my head a lot more recently and allowed me to stay in shell script land vs bailing to Python.
I used it plenty over the years, but with a lot of trial and error. Now, I see it as an event engine and it just flows naturally. It’s so great for generating reports from log files, simple csv, data dumps, etc. it’s sad to see it used as ‘cut’ in most scripts.
It’s like a basin wrench. It has a small scope, but once you use it and grok it, you’d never want to do those things with another tool.
That said, I have no use for features above POSIX. It’s essentially a DSL for me, and turning it into Perl ruins the simplicity. I’ll move on to a general purpose language that others can understand and maintain vs use esoteric extensions.
- jjice 6y ago> allowed me to stay in shell script land vs bailing to Python This is something I've been working on as well. I know how to get any utility task I want done in Python, but it requires a lot more work than being able to pipe commands well in a shell. I've been going out of my way to do things in Bash instead as a way to become to familiar with standard Unix utils. It's a fun little thing to do that ends up resulting in more efficient use down the line.