Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153219432
D28509.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28509.diff
View Options
diff --git a/usr.bin/grep/grep.1 b/usr.bin/grep/grep.1
--- a/usr.bin/grep/grep.1
+++ b/usr.bin/grep/grep.1
@@ -30,7 +30,7 @@
.\"
.\" @(#)grep.1 8.3 (Berkeley) 4/18/94
.\"
-.Dd February 4, 2021
+.Dd April 17, 2021
.Dt GREP 1
.Os
.Sh NAME
@@ -45,13 +45,13 @@
.Op Fl abcdDEFGHhIiLlmnOopqRSsUVvwxz
.Op Fl A 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 f Ar file
.Op Fl Fl binary-files= Ns Ar value
.Op Fl Fl color 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 line-buffered
.Op Fl Fl null
@@ -123,18 +123,15 @@
.It Fl b , Fl Fl byte-offset
The offset in bytes of a matched pattern is
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
.Ar num
lines of leading and trailing context surrounding each match.
-The default value of
-.Ar num
-is
-.Dq 2
-and is equivalent to
-.Dq Fl A Ar 2 Fl B Ar 2 .
-Note:
-no whitespace may be given between the option and its argument.
+See also the
+.Fl A
+and
+.Fl B
+options.
.It Fl c , Fl Fl count
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
diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c
--- a/usr.bin/grep/grep.c
+++ b/usr.bin/grep/grep.c
@@ -57,9 +57,9 @@
"",
/* 1*/ "(standard input)",
/* 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",
-/* 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",
/* 7*/ "Binary file %s matches\n",
/* 8*/ "%s (BSD grep, GNU compatible) %s\n",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 20, 9:25 PM (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31865759
Default Alt Text
D28509.diff (2 KB)
Attached To
Mode
D28509: grep: Fix an incorrect description of the -C flag
Attached
Detach File
Event Timeline
Log In to Comment