3 ms·
What's the modern solution to text processing on the command line? I don't think anyone tried seriously addressing that use case after Perl. Like, obviously yo
by jsnell 2y ago
What's the modern solution to text processing on the command line?
I don't think anyone tried seriously addressing that use case after Perl. Like, obviously you can do text processing in any language, but you're not going to be doing it in the context of shell pipelines and one-liners. The preferred interaction modes are totally different.
- shakna 2y agoI've been disappointed to see a massive uptick in people writing a whole Python subprocess script instead of just an awk column select. They usually know awk, but Python is more familiar so they replace ten characters with a couple hundred. It seems like fewer even want to learn a shell pipeline.
- Qem 2y agoThere was actually attempts to recreate Awk inside Python. See https://github.com/alecthomas/pawk https://github.com/alecthomas/pawk
- wodenokoto 2y agoThat was bad phrasing on my part, I meant "Is there a modern alternative I should go with instead?" - I also don't know what it would be. But I would love to know if there is a non-regular expression language with native support for csv, json and yaml that one can pipe files in and out of.
- dmd 2y agoNot exactly what you're looking for, but you'd probably like looking at miller / mlr. https://github.com/johnkerl/miller https://github.com/johnkerl/miller