Is perl faster than egrep

Change Management Toolkit - Second Edition

The answer is: it depends.

It depends *greatly* on the specific regex you want to use, and how you want to process the output.

Your examples indicate you want to remove lines from a file that match a particular regex.

If that’s *all* you want to do, and all you will ever want to do, then you should implement your solution using some form of grep (hint: fgrep is super fast, if that’s sufficient for your purposes).

One of the nice thing about Perl is that it allows you to expand your processing later.

Say, in addition to removing lines that match a particular pattern, you also want to count how many lines match some other pattern.

Doing so with grep would be very painful, and you’d probably have to use pipes.

With Perl, adding code to your script to do that is trivial.

More Resources on Is perl faster than egrep:
http://www.tutorialspoint.com/ruby/ruby_regular_expressions.htm

Read more about Is perl faster than egrep:

The Art of Service offers innovative competence development programs for IT Best Practices to support the educational needs of IT Professionals.

This question originally appeared on Quora.

The Art of Service offers innovative competence development programs for IT Best Practices to support the educational needs of IT Professionals., Learn more about Change Management Toolkit – Second Edition HERE:

Change Management Toolkit - Second Edition and Is perl faster than egrep

Change Management Toolkit - Second Edition - Is perl faster than egrep

Change Management Toolkit - Second Edition and Is perl faster than egrep

Change Management Toolkit - Second Edition - Is perl faster than egrep

Previous post:

Next post:

live chat mac