Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/grep/grep.1
Show All 24 Lines | |||||||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||||||
.\" | .\" | ||||||||
.\" @(#)grep.1 8.3 (Berkeley) 4/18/94 | .\" @(#)grep.1 8.3 (Berkeley) 4/18/94 | ||||||||
.\" | .\" | ||||||||
.Dd February 4, 2021 | .Dd April 17, 2021 | ||||||||
.Dt GREP 1 | .Dt GREP 1 | ||||||||
.Os | .Os | ||||||||
.Sh NAME | .Sh NAME | ||||||||
.Nm grep , | .Nm grep , | ||||||||
.Nm egrep , | .Nm egrep , | ||||||||
.Nm fgrep , | .Nm fgrep , | ||||||||
.Nm rgrep | .Nm rgrep | ||||||||
.Nd file pattern searcher | .Nd file pattern searcher | ||||||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||||||
.Nm grep | .Nm grep | ||||||||
.Bk -words | .Bk -words | ||||||||
.Op Fl abcdDEFGHhIiLlmnOopqRSsUVvwxz | .Op Fl abcdDEFGHhIiLlmnOopqRSsUVvwxz | ||||||||
.Op Fl A Ar num | .Op Fl A Ar num | ||||||||
.Op Fl B Ar num | .Op Fl B Ar num | ||||||||
.Op Fl C Ns Op Ar num | .Op Fl C Ar num | ||||||||
.Op Fl e Ar pattern | .Op Fl e Ar pattern | ||||||||
.Op Fl f Ar file | .Op Fl f Ar file | ||||||||
.Op Fl Fl binary-files= Ns Ar value | .Op Fl Fl binary-files= Ns Ar value | ||||||||
.Op Fl Fl color Ns Op Cm = Ns Ar when | .Op Fl Fl color Ns Op Cm = Ns Ar when | ||||||||
.Op Fl Fl colour Ns Op Cm = Ns Ar when | .Op Fl Fl colour Ns Op Cm = Ns Ar when | ||||||||
.Op Fl Fl context Ns Op Cm = Ns Ar num | .Op Fl Fl context= Ns Ar num | ||||||||
.Op Fl Fl label | .Op Fl Fl label | ||||||||
.Op Fl Fl line-buffered | .Op Fl Fl line-buffered | ||||||||
.Op Fl Fl null | .Op Fl Fl null | ||||||||
.Op Ar pattern | .Op Ar pattern | ||||||||
.Op Ar | .Op Ar | ||||||||
.Ek | .Ek | ||||||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||||||
The | The | ||||||||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||||||
See also the | See also the | ||||||||
.Fl A | .Fl A | ||||||||
and | and | ||||||||
.Fl C | .Fl C | ||||||||
options. | options. | ||||||||
.It Fl b , Fl Fl byte-offset | .It Fl b , Fl Fl byte-offset | ||||||||
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 Oo Ar num Oc , Fl Fl context Ns Oo = Ns Ar num Oc | .It Fl C Ar num , Fl Fl context= Ns Ar num | ||||||||
yuripvUnsubmitted Done Inline Actions
yuripv: | |||||||||
Done Inline ActionsActually, nevermind that, it seems the entire man page has = as part of option name, so let's keep it consistent. yuripv: Actually, nevermind that, it seems the entire man page has `=` as part of option name, so let's… | |||||||||
.Ar num | .Ar num | ||||||||
lines of leading and trailing context surrounding each match. | lines of leading and trailing context surrounding each match. | ||||||||
The default value of | See also the | ||||||||
.Ar num | .Fl A | ||||||||
is | and | ||||||||
.Dq 2 | .Fl B | ||||||||
and is equivalent to | options. | ||||||||
.Dq Fl A Ar 2 Fl B Ar 2 . | |||||||||
Note: | |||||||||
no whitespace may be given between the option and its argument. | |||||||||
.It Fl c , Fl Fl count | .It Fl c , Fl Fl count | ||||||||
Only a count of selected lines is written to standard output. | Only a count of selected lines is written to standard output. | ||||||||
.It Fl Fl colour= Ns Oo Ar when Oc , Fl Fl color= Ns Oo Ar when Oc | .It Fl Fl colour= Ns Oo Ar when Oc , Fl Fl color= Ns Oo Ar when Oc | ||||||||
Mark up the matching text with the expression stored in the | Mark up the matching text with the expression stored in the | ||||||||
.Ev GREP_COLOR | .Ev GREP_COLOR | ||||||||
environment variable. | environment variable. | ||||||||
The possible values of | The possible values of | ||||||||
.Ar when | .Ar when | ||||||||
▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines |