7 ms·
If you find awk unreadable, maybe check out this link? https://ferd.ca/awk-in-20-minutes.html https://ferd.ca/awk-in-20-minutes.html I actually find awk very r
by czynskee 6y ago
If you find awk unreadable, maybe check out this link?
https://ferd.ca/awk-in-20-minutes.html https://ferd.ca/awk-in-20-minutes.html
I actually find awk very readable. It's a far simpler language than Python really.
The exception is perhaps if you need to do something complex, like parse a csv.
- busterarm 6y agoHonestly I think if someone finds awk unreadable, they're probably cutting corners elsewhere and probably shouldn't be doing unix systems programming. It's like all of the bash scripts that we see that don't handle failures and traps or print a usage block.
- rmrfstar 6y agoOut of curiosity, I grepped the Qubes github repos for awk. Here's the most complicated use I could find: awk -F : '/\/home/ { print $1":"$3":"$4":"$6 } '
- munificent 6y ago> It's a far simpler language than Python really. This is true, but if you already know Python, then "awk + Python" has greater total complexity than "just Python". So the question is does awk add enough value to be worth the incremental cost of learning it in addition to Python? I think for many, the answer is "no".