Linux

参考: http://www.cnblogs.com/end/archive/2012/02/21/2360965.html

Usage: grep [OPTION]... PATTERN [FILE]...

Search for PATTERN in each FILE or standard input.

PATTERN is, by default, a basic regular expression (BRE).

Example: grep -i 'hello world' menu.h main.c


option:

-i: --ignore-case, ignore case distinctions

-w: --word-regexp, force PATTERN to match only whole words

grep -c

grep -e

原文地址:https://www.cnblogs.com/cnblogist/p/5912872.html