grep has tons of great options, like

-F = fgrep; no regex – way faster
-v = as mentioned in the article
-o = print only matched input, not the entire line
-C = context, print lines before and after the match; can also be used partially with -A (after) and -B (before)

Recursively grep a directory

grep -r "texthere" .

#grep

Advertisements