--lines=NUM | Only print NUM lines of each file |
-l, --files-with-matches | Only print filenames containing matches |
-L, --files-without-matches | Only print filenames with no matches |
--output=expr | Output the evaluation of expression for each lineTurns off text highlighting. |
-o | Show only the part of a line matching pattern |
--passthru | Print all lines, whether matching or not |
--match PATTERN | Specify pattern explicitly. |
-m, --max-count=NUM | Stop searching in each file after NUM matches |
-1 | Stop searching after one match of any kind |
-H, --with-filename | Print the filename for each matchThis is the default unless explicitly searching a single file. |
-h, --no-filename | Suppress the prefixing filename on output |
-c, --count | Show number of lines matching per file |
--[no]column | Show the column number of the first match |
-A NUM, --after-context=NUM | Print NUM lines of trailing context after matching lines |
-B NUM, --before-context=NUM | Print NUM lines of leading context before matching lines |
-C [NUM], --context[=NUM] | Print NUM lines of output contextThe default is 2. |
--print0 | Print null byte as separator between filenamesOnly works with -f, -g, -l, -L or -c. |
-s | Suppress error messages about nonexistent or unreadable files |