3 ms·
> Awk does the job perfectly well I've always been of the opinion that you're better served by learning Perl and using it. The syntax for quick things is very
by kbenson 8y ago
> Awk does the job perfectly well
I've always been of the opinion that you're better served by learning Perl and using it. The syntax for quick things is very similar to Awk, but you also get all of CPAN to back you up in case you need to do something more complex.
For example, real CSV parsing, HTML parsing with queryselector access, complex record destructuring and/or inner-record decompression, and sprintf (among many others) for for output.
I still do a lot of cat / grep / cut / sort / uniq type commands, but whenever I have need of a little complexity, Perl is definitely my go to tool. I think it's already installed in most common installation choices for most distros.
- gjulianm 8y agoI don't think I've used awk scripts more than in one or two occasions, I use it mostly for one liners and there I like awk's simplicity. When I need something more complex I resort to Python which is slower but usually manageable, you're right that if I knew Perl I'd have both tools in one language.