bug#71252: why does grep match literal newlines when there are none, even with -z?

2024-05-28 Thread Philippe Cerfon
Hey. I always thought, that grep is line based in a way that the current string doesn't hold the line terminator. If so, why does, e.g.: $ printf 'foo' | grep $'\n' foo match? Even with -z. While: $ printf 'foo\nbar' | grep -z $'\n' foo bar would make sense to me, why does it also match

bug#71252: why does grep match literal newlines when there are none, even with -z?

2024-05-29 Thread Philippe Cerfon
On Wed, May 29, 2024 at 8:09 AM Martin Schulte wrote: > PATTERNS is one or more patterns separated by newline characters, and grep > prints each line that matches a pattern. Dammit, it's so obvious. Sorry for the noise. Well actually, there is still one curious point left: If these are now two