Bug 72985

Summary: `grep` man page typo/error for --line-buffering / --line-buffered option
Product: Documentation Reporter: John Engelhart <johne>
Component: Books & ArticlesAssignee: Giorgos Keramidas <keramida>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description John Engelhart 2004-10-22 00:50:29 UTC
The man page for the command grep has a typo/error in it.

The option syntax for "line-buffered" output is specified in the man page as:

--line-buffering

Whereas the command itself takes (from grep --help, and checked by running)

      --line-buffered       flush output on every line

Fix: 

Update man page to reflect actual syntax with " --line-buffered"
How-To-Repeat: Check "man grep" and "grep --help", also trying passing both to grep to verify.
Comment 1 Giorgos Keramidas freebsd_committer freebsd_triage 2004-10-22 09:49:29 UTC
On 2004-10-21 23:46, John Engelhart <johne@zang.com> wrote:
> >Environment:
> FreeBSD new.zang.com 5.3-BETA7 FreeBSD 5.3-BETA7 #0:\
> Sun Oct 17 00:32:33 EDT 2004     \
> johne@new.zang.com:/usr/src/sys/i386/compile/new  i386
>
> >Description:
> The man page for the command grep has a typo/error in it.
>
> The option syntax for "line-buffered" output is specified in the man page as:
>
> --line-buffering
>
> Whereas the command itself takes (from grep --help, and checked by running)
>
>       --line-buffered       flush output on every line

You are right.  Does the following change look ok?

%%%
Index: grep.1
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/grep/grep.1,v
retrieving revision 1.25
diff -u -u -r1.25 grep.1
--- grep.1	4 Jul 2004 10:02:03 -0000	1.25
+++ grep.1	22 Oct 2004 08:47:28 -0000
@@ -312,8 +312,9 @@
 This is especially useful for tools like zgrep, e.g.
 .B "gzip -cd foo.gz |grep --label=foo something"
 .TP
-.BR \-\^\-line-buffering
-Use line buffering, it can be a performance penality.
+.BR \-\^\-line-buffered
+Flush output on every line.
+Note that this incurs a performance penalty.
 .TP
 .BR \-q ", " \-\^\-quiet ", " \-\^\-silent
 Quiet; do not write anything to standard output.
%%%
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2004-11-09 17:01:22 UTC
State Changed
From-To: open->patched

I've fixed this in CURRENT.   Thanks :-) 


Comment 3 Giorgos Keramidas freebsd_committer freebsd_triage 2004-11-09 17:01:22 UTC
Responsible Changed
From-To: freebsd-doc->keramida

I will handle the merge to RELENG_5 and RELENG_4.
Comment 4 Giorgos Keramidas freebsd_committer freebsd_triage 2004-12-21 22:23:36 UTC
State Changed
From-To: patched->closed

The change is merged to RELENG_5 now.