Paul Eggert wrote: > On 03/01/2016 02:05 AM, Marcello Perathoner wrote: >> 2) If you just output >> >> binary line 42 in file x matches >> >> and continue regular output after the next newline, the breakage would be much >> more confined. > > This sounds like a good suggestion. That is, grep could keep going if its only > problem is an attempt to output encoding errors (as opposed to reading null > bytes, which are a more-reliable indication of binary data). It would probably > be better to output just one "Binary file matches" line per file, at the end of > the other matches, so that it's more likely to be noticed. I finally got around to implementing this, which turned out to be considerably easier than I thought it would be. I installed the attached patch into the grep Savannah master. I am boldly closing this old bug report; we can always start a new report if further problems turn up.