Lines Matching +full:input +full:- +full:only

41 .Bk -words
48 .Op Fl Fl binary-files= Ns Ar value
53 .Op Fl Fl line-buffered
61 utility searches any given input files,
63 By default, a pattern matches an input line if the regular expression
64 (RE) in the pattern matches the input line
67 Each input line that matches at least one of the patterns is written
85 but can only handle fixed patterns
88 allowing any of the pattern lines to match a portion of the input.
91 .Bl -tag -width indent
92 .It Fl A Ar num , Fl Fl after-context= Ns Ar num
111 .It Fl B Ar num , Fl Fl before-context= Ns Ar num
120 .It Fl b , Fl Fl byte-offset
133 Only a count of selected lines is written to standard output.
176 .It Fl E , Fl Fl extended-regexp
187 used during the search of the input:
188 an input line is selected if it matches any of the specified patterns.
195 .Pq Sq - .
212 not only to the filename component.
213 .It Fl Fl exclude-dir Ar pattern
221 .Fl Fl exclude-dir
223 .Fl Fl include-dir
227 .Fl Fl include-dir
230 .It Fl F , Fl Fl fixed-strings
241 Empty pattern lines match every input line.
246 .It Fl G , Fl Fl basic-regexp
256 .It Fl h , Fl Fl no-filename
265 .Dq Fl Fl binary-files= Ns Cm without-match
267 .It Fl i , Fl Fl ignore-case
273 If specified, only files matching the given filename
283 not only to the filename component.
284 .It Fl Fl include-dir Ar pattern
287 is specified, only directories matching the given filename
291 .Fl Fl include-dir
293 .Fl Fl exclude-dir
296 .It Fl L , Fl Fl files-without-match
297 Only the names of files not containing selected lines are written to
300 If the standard input is searched, the string
301 .Dq (standard input)
305 .It Fl l , Fl Fl files-with-matches
306 Only the names of files containing selected lines are written to
309 will only search a file until a match has been found,
312 If the standard input is searched, the string
313 .Dq (standard input)
319 .Dq (standard input)
331 to read input, which can result in better performance under some
333 .It Fl m Ar num , Fl Fl max-count= Ns Ar num
337 .It Fl n , Fl Fl line-number
350 Prints a zero-byte after the file name.
354 is specified, follow symbolic links only if they were explicitly listed
357 .It Fl o , Fl Fl only-matching
358 Prints only the matching part of the lines.
368 will only search a file until a match has been found,
381 .It Fl s , Fl Fl no-messages
388 This option has no effect and is provided only for compatibility with GNU grep.
391 .It Fl v , Fl Fl invert-match
395 .It Fl w , Fl Fl word-regexp
405 .It Fl x , Fl Fl line-regexp
406 Only input lines selected against an entire fixed string or regular
412 .It Fl z , Fl Fl null-data
413 Treat input and output data as sequences of lines terminated by a
414 zero-byte instead of a newline.
415 .It Fl Fl binary-files= Ns Ar value
418 .Bl -tag -compact -width "binary (default)"
421 .It Cm without-match
426 .It Fl Fl line-buffered
432 If no file arguments are specified, the standard input is used.
434 .Dq Cm -
436 read from standard input.
443 .Bl -tag -width "GREP_OPTIONS"
445 This variable specifies the color used to highlight matched (non-empty) text.
451 This variable specifies the type name of the terminal, console or display-device
461 .Bl -tag -width flag -compact
470 .Bl -dash
478 Same as above but looking only for complete words:
480 .Dl $ grep -w 'patricia' myfile
486 .Dl $ grep -c FOO myfile
490 .Dl $ grep -c -i FOO myfile
515 .Dl $ grep -v -e 'foo' -e 'bar' myfile
531 .Dl $ grep -H -R FIXME --include="*.h" /usr/src/sys/arm/
533 Same as above but show only the name of the matching file:
535 .Dl $ grep -l -R FIXME --include="*.h" /usr/src/sys/arm/
542 .Dl $ grep -b --colour -n foo myfile
545 standard input:
547 .Dl $ echo -e 'Free\enBSD\enAll.*reserved' | grep -E -f - myfile
554 .Dl $ pciconf -lv | grep -B3 -A1 -E 'class.*=.*storage'
558 .Dl $ grep -q foo myfile && echo File matches
570 .St -p1003.1-2008