grep: Fix an incorrect description of the -C flag
It seems that the number of lines is no longer an optional parameter to the -C flag. Document it accordingly both in the manual page and the usage message. Reviewed by: yuripv Approved by: yuripv MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28509
This commit is contained in:
parent
c0e41dff70
commit
be6b8b7a3a
@ -30,7 +30,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" @(#)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
|
||||||
@ -45,13 +45,13 @@
|
|||||||
.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
|
||||||
@ -123,18 +123,15 @@ 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
|
||||||
Print
|
Print
|
||||||
.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
|
||||||
|
@ -57,9 +57,9 @@ const char *errstr[] = {
|
|||||||
"",
|
"",
|
||||||
/* 1*/ "(standard input)",
|
/* 1*/ "(standard input)",
|
||||||
/* 2*/ "unknown %s option",
|
/* 2*/ "unknown %s option",
|
||||||
/* 3*/ "usage: %s [-abcDEFGHhIiLlmnOoPqRSsUVvwxz] [-A num] [-B num] [-C[num]]\n",
|
/* 3*/ "usage: %s [-abcDEFGHhIiLlmnOoPqRSsUVvwxz] [-A num] [-B num] [-C num]\n",
|
||||||
/* 4*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n",
|
/* 4*/ "\t[-e pattern] [-f file] [--binary-files=value] [--color=when]\n",
|
||||||
/* 5*/ "\t[--context[=num]] [--directories=action] [--label] [--line-buffered]\n",
|
/* 5*/ "\t[--context=num] [--directories=action] [--label] [--line-buffered]\n",
|
||||||
/* 6*/ "\t[--null] [pattern] [file ...]\n",
|
/* 6*/ "\t[--null] [pattern] [file ...]\n",
|
||||||
/* 7*/ "Binary file %s matches\n",
|
/* 7*/ "Binary file %s matches\n",
|
||||||
/* 8*/ "%s (BSD grep, GNU compatible) %s\n",
|
/* 8*/ "%s (BSD grep, GNU compatible) %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user