> This is documented behavior; the grep manual says that when grep is reading a binary file it "may treat non-text bytes as line terminators". > You can use grep's -a (--text) option to if you want to match null bytes.
Paul, Thanks for pointing this out. Didn't know that as it works on 2.20. Then if it's binary file, grep should default to "-a" to make it compatible with the old behavior? My best., Jeff On Sun, Jul 28, 2019 at 1:16 AM Paul Eggert <egg...@cs.ucla.edu> wrote: > This is documented behavior; the grep manual says that when grep is > reading a > binary file it "may treat non-text bytes as line terminators". > > You can use grep's -a (--text) option to if you want to match null bytes. >