perl, regex, UNIX

UNIX tip of the day – grep -P is slow

Unless you really need some advanced regular expressions only supported by PCRE, using POSIX regular expressions with grep is usually an order of magnitude faster