4 ms·
I recently had a sort of "contest" with someone for parsing the output of a tool. I had to parse some text output into a tree structure. The other person wrote
by oblio 9y ago
I recently had a sort of "contest" with someone for parsing the output of a tool. I had to parse some text output into a tree structure.
The other person wrote it in awk, quite quickly. After writing my own version in Python (my version was waaaay over-engineered), I decided to blatantly rip-off the awk solution and re-implement it in Python.
It was almost as simple and as short.
Awk is much more compact as a language, but also way more limited. And it still has its quirks and a certain volume of information you have to gather. I'd say it's more worthwhile to learn Python instead, because you'll be able to use it for other purposes.