사용법: grep [옵션]... 패턴 [파일] ... Search for PATTERN in each FILE or standard input. Example: grep -i 'hello world' menu.h main.c
Regexp selection and interpretation:
-i, --ignore-case ignore case distinctions
Output control:
-n, --line-number print line number with output lines --line-buffered flush output on every line
-R, -r, --recursive equivalent to --directories=recurse --include=PATTERN files that match PATTERN will be examined --exclude=PATTERN files that match PATTERN will be skipped. --exclude-from=FILE files that match PATTERN in FILE will be skipped. -l, --files-with-matches only print FILE names containing matches
`egrep' means `grep -E'. `fgrep' means `grep -F'. With no FILE, or when FILE is -, read standard input. If less than two FILEs given, assume -h. Exit status is 0 if match, 1 if no match, and 2 if trouble.