2 ms·
I've never really been able to keep a significant amount of awk in my head. Mostly I use it for splitting out columns in output, especially when the fields may
by linsomniac 8y ago
I've never really been able to keep a significant amount of awk in my head. Mostly I use it for splitting out columns in output, especially when the fields may be padded for output. So "{ print $2 }".
Awk has great abilities, but when I want to use it I always have to spend a lot of time reading.
I've always wanted to come up with something in Python that combined the awesomeness of awk with my ability to pick up and hack something together in Python, but I've never been able to come up with the right semantics.
One thing I think could be really useful is the regex lines range, where you give it two regexes and that block of code gets executed on every line in that range.