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
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