| /num | Matches will be displayed with num lines of leading and trailing context. However, grep will never display any given line more than once. |
| /A num | Display num lines of trailing context after matching lines. |
| /B num | Display num lines of leading context before matching lines. |
| /C | Equivalent to -2. |
| /V | Display the version number of grep. |
| /b | Display the byte offset within the input file before each line of output. |
| /c | Suppress normal output; instead display a count of matching lines for each input file. With the -v option, count non-matching lines. |
| /e | Use pattern as the pattern; useful to protect patterns beginning with -. |
| /f file | Obtain the pattern from file. |
| /h | Suppress the prefixing of filenames on output when multiple files are searched. |
| /i | Ignore case distinctions in both the pattern and the input files. |
| /L | Suppress normal output; instead display the name of each input file from which no output would normally have been displayed. |
| /l | Suppress normal output; instead display the name of each input file from which output would normally have been displayed. |
| /n | Prefix each line of output with the line number within its input file. |
| /q | Quiet; suppress normal output. |
| /s | Suppress error messages about nonexistent or unreadable files. |
| /v | Invert the sense of matching, to select non-matching lines. |
| /w | Select only those lines containing matches that form whole words. The test is that the matching substring must either be at the beginning of the line, or preceded by a non-word constituent character. Similarly, it must be either at the end of the line or followed by a non-word constituent character. Word-constituent characters are letters, digits, and the underscore. |
| /x | Select only those matches that exactly match the whole line. |