[ILUG] Parsing large files with grep

Rory Browne rbmlist at gmail.com
Sun Nov 25 15:12:35 GMT 2007


>
> perl likely is faster, once running. However, perl is much bigger and
> slower to startup (e.g. for one-liners that are invoked for every
> line of an input file, you're *much* better off using AWK than perl).


I only invoke perl once - after that it loops through the input lines.




> What baffles me is that, once you've dragged in perl, that you
> wouldn't use it to solve the whole problem in one pass..



I didn´t want to give perl too much to do - I wanted to reduce its workload
by prefiltering it through grep. It´s like trying to reach a certain part of
Dublin that can only be reached on foot - you don´t walk from Galway - you
drive to dublin, and then walk the rest of the way.



More information about the ILUG mailing list