[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: piping tail -f through cut
From: |
Pádraig Brady |
Subject: |
Re: piping tail -f through cut |
Date: |
Fri, 8 Feb 2008 09:37:34 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Bob van Loosen wrote:
> Hi everyone,
>
> Whenever I do this:
>
> tail -f /var/log/kern.log | cut -f 8- -d " " | dd bs=1
>
> I get no output, but when I do this:
>
> tail -f /var/log/kern.log | cut -f 8- -d " "
>
> I do get output, I'm using coreutils 5.97 on Ubuntu 7.10 64 bit.
I've documented that exact case here:
http://www.pixelbeat.org/programming/stdio_buffering/
There's a patch for `cut` there,
which demonstrates how to add this functionality to coreutils.
Personally I think it would be great to add the buffering control
to glibc, so that most applications would benefit.
But Ulrich Drepper <sarcasm>in his usual amiable style</sarcasm>
suggested this was a silly idea.
Pádraig.