GNU bug report logs - #21908
find -f breaks pipes ?

Previous Next

Package: coreutils;

Reported by: Flemming Gulager Danielsen <fgd <at> komplex-it.dk>

Date: Fri, 13 Nov 2015 16:07:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21908 in the body.
You can then email your comments to 21908 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#21908; Package coreutils. (Fri, 13 Nov 2015 16:07:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Flemming Gulager Danielsen <fgd <at> komplex-it.dk>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 13 Nov 2015 16:07:02 GMT) Full text and rfc822 format available.

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

From: Flemming Gulager Danielsen <fgd <at> komplex-it.dk>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: find -f breaks pipes ?
Date: Fri, 13 Nov 2015 14:20:09 +0000
[Message part 1 (text/plain, inline)]
Hi Guyz!

I am new here so if this is not the proper use of the maillist then I am sorry. I normally think I know my way around shells, but this I cant get the below to work. And I am wondering if it is a bug I need to report on tail util.

I run this command on a file.

tail -f testfile | tr -d H | grep e

while I in another shell

echo "Testing" >> testfile.

If leave out "| grep e" I get the output. I have tried with xargs echo {} also, but I get nothing if I go beond 2 pipes. It works fine if I go through a while read loop.

---
Med venlig hilsen / best regards
Flemming Danielsen
IT-Specialist
[cid:image001.gif <at> 01D0A42D.53D97C30]
Email:    fgd <at> komplex-it.dk<mailto:fgd <at> komplex-it.dk>
Mobil    +45 2026 9291
Telefon +45 8833 0478


[cid:image002.png <at> 01D0A42D.53D97C30]


Komplex-it A/S * Lyskær 13B * 2730 Herlev * www.komplex-it.dk<http://www.komplex-it.dk>

[Message part 2 (text/html, inline)]
[image001.png (image/png, inline)]
[image002.png (image/png, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#21908; Package coreutils. (Fri, 13 Nov 2015 17:18:02 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: Flemming Gulager Danielsen <fgd <at> komplex-it.dk>, 21908 <at> debbugs.gnu.org
Subject: Re: bug#21908: find -f breaks pipes ?
Date: Fri, 13 Nov 2015 17:17:14 +0000
tag 21908 notabug
close 21908
stop

On 13/11/15 14:20, Flemming Gulager Danielsen wrote:
> Hi Guyz!
> 
> I am new here so if this is not the proper use of the maillist then I am sorry. I normally think I know my way around shells, but this I cant get the below to work. And I am wondering if it is a bug I need to report on tail util.
> 
> I run this command on a file.
> 
> tail -f testfile | tr -d H | grep e
> 
> while I in another shell
> 
> echo “Testing” >> testfile.
> 
> If leave out “| grep e” I get the output. I have tried with xargs echo {} also, but I get nothing if I go beond 2 pipes. It works fine if I go through a while read loop.

The data is buffered as detailed at:
http://www.pixelbeat.org/programming/stdio_buffering/

You can change the buffering with stdbuf. For e.g.:

  tail -f testfile | stdbuf -oL tr -d H | grep e

cheers,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#21908; Package coreutils. (Sat, 14 Nov 2015 09:30:03 GMT) Full text and rfc822 format available.

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

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Pádraig Brady <P <at> draigBrady.com>,
 Flemming Gulager Danielsen <fgd <at> komplex-it.dk>, 21908 <at> debbugs.gnu.org
Subject: Re: bug#21908: find -f breaks pipes ?
Date: Sat, 14 Nov 2015 10:29:26 +0100
On 11/13/2015 06:17 PM, Pádraig Brady wrote:
> You can change the buffering with stdbuf. For e.g.:
> 
>   tail -f testfile | stdbuf -oL tr -d H | grep e

Additionally, depending on whether you furtherly process the output,
e.g. with yet another "| grep .", you see that grep also uses some
output buffering, so you may end up with:

 tail -f testfile \
   | stdbuf -oL tr -d H \
   | grep --line-buffered e \
   | grep .

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#21908; Package coreutils. (Mon, 16 Nov 2015 00:02:01 GMT) Full text and rfc822 format available.

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

From: Bob Proulx <bob <at> proulx.com>
To: Flemming Gulager Danielsen <fgd <at> komplex-it.dk>
Cc: 21908 <at> debbugs.gnu.org
Subject: Re: bug#21908: find -f breaks pipes ?
Date: Sun, 15 Nov 2015 17:01:40 -0700
Flemming Gulager Danielsen wrote:
> I am new here so if this is not the proper use of the maillist then
> I am sorry.

Others answered your output buffering question.  Let me address the
mailing list question.

When you send a message to bug-coreutils it opens a bug ticket so that
we can track bugs and they won't get lost.  When asking a question
such as you are doing it is better to use the coreutils <at> gnu.org
mailing list instead.  That is a normal mailing list just for
discussion and no bug tickets opened.  It is the better place for
questions and discussion.

Bob




Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:18:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 21908 <at> debbugs.gnu.org and Flemming Gulager Danielsen <fgd <at> komplex-it.dk> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 24 Oct 2018 21:18:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 22 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 205 days ago.

Previous Next


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