CLI
Use ack instead of grep to parse text files
You know this guy?
grep needle haystack |grep special_needle
or his inverted cousin:
grep needle haystack |grep -v unspecial_needle
These are common staples of searching through text files.
You should stop using them. Now.
You can do much better by writing more consice regular expressions and using ack or one of its relatives (ack-grep, or rak).
The primary virtue of these commands is that they use the Perl regular expression engine. Most programmers with experience in any of the major scripting languages will find this more comfortable than grep’s use of the GNU regex syntax.
I recently encountered a need to search through many files based on a complex regular expression that required lookahead and lookbehind asserions.