bsdgrep does not work with tail -f | grep combination

Gabor Kovesdan gabor at FreeBSD.org
Thu Aug 5 04:53:16 UTC 2010


Em 2010.08.04. 20:06, Xin LI escreveu:
> I'm able to reproduce the GNU behavior on 9.0-CURRENT which is IMO right.
>
> I think we need to break at the line end to provide better interactivity
> (the current code seems to do it (buffer is not full&&  !eof), while
> what we wanted is (buffer is not full&&  !eof&&  !eol).
>
> The attached patch should fix this but I have not yet thoroughly tested
> it due to job work.
>
>    
I think the patch may break binary detection. That buffer is not a 
general buffer but filled in only once with the first n bytes of the 
file to check if the file is binary. If you stop after the first line, 
only the first line will be used for binary checking. I'll look at this 
problem soon.

Gabor


More information about the freebsd-current mailing list