Closed lvillanne-recia closed 8 months ago
I found out what the problem was. It's a buffer problem in grep, just add the --line-buffered
argument to grep and it will work :
$ tail -f foo.txt | grep "foo" --color=never --line-buffered | ccze -A
foo
So the problem had nothing to do with ccze
as the same behaviour is reproducible with cat
.
When I use
ccze
withtail -f
andgrep
sometimes some lines at the end of the file that should be displayed are not.For example, with this very simple :
If I just do a
tail -f
on it, it works:If I just do a
tail
and agrep
on it, it works:If I do a
tail -f
and agrep
withoutccze
it works:But if I do a
tail -f
and agrep
withccze
it doesn't work, no line is displayed:I've also tested disabling grep colouring, which doesn't change anything: