On 4/20/19 4:41 AM, 積丹尼 Dan Jacobson wrote:
‘--line-buffered’
Use line buffering on output. This can cause a performance
penalty.
OK, but say what will happen if one doesn't use this. Paragraph
buffering? Page buffering?
Thanks for mentioning this. I installed the attached patch to try to clarify
this point.
>From 2508eb94fbd01c73f78f742b61953fdf938acf4b Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 22 Sep 2020 10:56:29 -0700
Subject: [PATCH] doc: improve --line-buffer doc
* doc/grep.texi (Other Options): Document --line-buffered more
carefully, and say what happens when it is not used. Problem
reported by Dan Jacobson (Bug#35339).
---
doc/grep.texi | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/doc/grep.texi b/doc/grep.texi
index 15185f3..bb76ae1 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -771,8 +771,11 @@ and @file{file2}.
@item --line-buffered
@opindex --line-buffered
@cindex line buffering
-Use line buffering on output.
-This can cause a performance penalty.
+Use line buffering for standard output, regardless of output device.
+By default, standard output is line buffered for interactive devices,
+and is fully buffered otherwise. With full buffering, the output
+buffer is flushed when full; with line buffering, the buffer is also
+flushed after every output line. The buffer size is system dependent.
@item -U
@itemx --binary
--
2.17.1