GNU bug report logs - #18750
--line-buffered option doesn't work with --files-with-matches

Previous Next

Package: grep;

Reported by: "Louis S." <sautier.louis <at> gmail.com>

Date: Thu, 16 Oct 2014 21:22:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Louis S." <sautier.louis <at> gmail.com>
To: bug-grep <at> gnu.org
Subject: --line-buffered option doesn't work with --files-with-matches
Date: Thu, 16 Oct 2014 23:16:30 +0200
Hi, I'm not quite sure this is a bug but it appears that the
--line-buffered option has no effect when used in conjunction with
--files-with-matches.
Here are some tests I ran with grep 2.20:
$ time for i in {1..100}; do grep --line-buffered -Rl gnome /usr/ |
head -n1 >& /dev/null; done
real    0m54.831s
user    0m37.077s
sys     0m17.550s

$ time for i in {1..100}; do grep -Rl gnome /usr/ | head -n1 >& /dev/null; done
real    0m54.858s
user    0m36.987s
sys     0m17.657s

$ time for i in {1..100}; do grep --line-buffered -R gnome /usr/ |
head -n1 >& /dev/null; done
real    0m7.414s
user    0m4.727s
sys     0m2.613s

Please let me know if line-buffering is supposed to work in that case.

Regards,

Louis




This bug report was last modified 9 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.