version 1.44, 2017/12/09 18:38:37 |
version 1.45, 2017/12/10 09:17:24 |
|
|
.Op Fl -binary-files Ns = Ns Ar value |
.Op Fl -binary-files Ns = Ns Ar value |
.Op Fl -context Ns Op = Ns Ar num |
.Op Fl -context Ns Op = Ns Ar num |
.Op Fl -line-buffered |
.Op Fl -line-buffered |
|
.Op Fl -max-count Ns = Ns Ar num |
.Op Ar pattern |
.Op Ar pattern |
.Op Ar |
.Op Ar |
.Ek |
.Ek |
|
|
.It Fl b |
.It Fl b |
The offset in bytes of a matched pattern is |
The offset in bytes of a matched pattern is |
displayed in front of the respective matched line. |
displayed in front of the respective matched line. |
.It Fl C Ns Op Ar num |
.It Fl C Ns Oo Ar num Oc , Fl -context Ns Op = Ns Ar num |
Print |
Print |
.Ar num |
.Ar num |
lines of leading and trailing context surrounding each match. |
lines of leading and trailing context surrounding each match. |
|
|
If the standard input is searched, the string |
If the standard input is searched, the string |
.Dq (standard input) |
.Dq (standard input) |
is written. |
is written. |
.It Fl m Ar num, Fl Fl max-count Ns = Ns Ar num |
.It Fl m Ar num , Fl -max-count Ns = Ns Ar count |
Stop after |
Stop after |
.Ar num |
.Ar num |
matches. |
matches. |
|
|
.Nm grep |
.Nm grep |
to behave as |
to behave as |
.Nm zgrep . |
.Nm zgrep . |
.It Fl Fl binary-files Ns = Ns Ar value |
.It Fl -binary-files Ns = Ns Ar value |
Controls searching and printing of binary files. |
Controls searching and printing of binary files. |
Options are |
Options are |
.Ar binary , |
.Ar binary , |
|
|
and |
and |
.Ar text : |
.Ar text : |
treat all files as text. |
treat all files as text. |
.Sm off |
.It Fl -line-buffered |
.It Fl Fl context Op = Ar num |
|
.Sm on |
|
Print |
|
.Ar num |
|
lines of leading and trailing context. |
|
The default is 2. |
|
.It Fl Fl line-buffered |
|
Force output to be line buffered. |
Force output to be line buffered. |
By default, output is line buffered when standard output is a terminal |
By default, output is line buffered when standard output is a terminal |
and block buffered otherwise. |
and block buffered otherwise. |
|
|
One or more lines were selected. |
One or more lines were selected. |
.It Li 1 |
.It Li 1 |
No lines were selected. |
No lines were selected. |
.It Li \*(Gt1 |
.It Li >1 |
An error occurred. |
An error occurred. |
.El |
.El |
.Sh EXAMPLES |
.Sh EXAMPLES |