grep, g – search a file for a pattern
Print only a count of matching lines.
Do not print file name tags (headers) with output lines.
The following argument is taken as a
Ignore alphabetic case distinctions. The implementation folds into lower case all letters in the pattern and input before interpretation. Matched lines are printed in their original form.
(ell) Print the names of files with selected lines; don’t print the lines.
Print the names of files with no selected lines;
the converse of
Mark each printed line with its line number counted in its file.
Produce no output, but return status.
Reverse: print lines that do not match the pattern.
The pattern argument is the name of a file containing regular expressions one per line.
Don’t buffer the output: write each output line as soon as it is discovered.
Output lines are tagged by file name when there is more than one
(To force this tagging, include
Care should be taken when
using the shell metacharacters
Exit status is null if any lines are selected, or non-null when no lines are selected or an error occurs.