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.



Reply via email to