--label=LABEL use LABEL as the standard input file name prefix -o, --only-matching show only the part of a line matching PATTERN -q, --quiet, --silent suppress all normal output --binary-files=TYPE assume that binary files are TYPE; TYPE is 'binary', 'text', or 'without-match' -...
but followallsymlinks--include=FILE_PATTERNsearch only files that match FILE_PATTERN--exclude=FILE_PATTERNskip filesanddirectories matching FILE_PATTERN--exclude-from=FILE skip files matching any file pattern from FILE--exclude-dir=PATTERN directories that match PATTERN will be skipped.-L,--files-wi...
-o,--only-matching:只显示匹配PATTERN部分。
--label=LABEL use LABEL as the standard input file name prefix -o, --only-matching show only the part of a line matching PATTERN -q, --quiet, --silent suppress all normal output --binary-files=TYPE assume that binary files are TYPE; TYPE is 'binary', 'text', or 'without-match' -...
-o, --only-matching show only the part of a line matching PATTERN -q, --quiet, --silent suppress all normal output --binary-files=TYPE assume that binary files are TYPE; TYPE is `binary', `text', or `without-match' -a, --text equivalent to --binary-files=text ...
--no-filename suppress the file name prefix on output--label=LABEL use LABEL as the standard input file name prefix-o,--only-matching show only the part of a line matching PATTERN-q,--quiet, --silent suppress all normal output--binary-files=TYPE assume that binary files are TYPE;TYPE...
-o, --only-matching show only the part of a line matching PATTERN -q, --quiet,--silentsuppress all normal output --binary-files=TYPE assume that binary files are TYPE;TYPE is'binary','text', or'without-match'-a,--textequivalent to --binary-files=text-Iequivalent to --binary-files=...
- 【重要】Search for lines matching a pattern, printing only the matched text: grep --only-matching "search_pattern" path/to/file - 【重要】Search stdin for lines that do not match a pattern: cat path/to/file | grep --invert-match "search_pattern" ...
-onumber, --only-matching=number Show only the part of the line that matched the capturing parentheses of the given number. Up to 32 capturing parentheses are supported. Because these options can be given without an argument (see above), if an argument is present, it must be given in ...