Strange results from using grep

Michael Abbott michael at
Tue Oct 3 08:13:06 BST 2006

> As you can see, when nothing matches, nothing is echoed back from the 
> command.  However, when tested on FreeBSD-6.1, it fails to find a match in 
> the same way and stubbornly just echoes out the string I'm looking for.  This 
> is the same with or without the trailing '-' to force grep to read from 
> stdin.

I presume you get exactly the same with an empty search file?  I mean, 
 	$ echo testing | grep -f /dev/null
also produce output?

On 4.11 grep works as expected, so maybe this is a horrible bug in grep 
introduced somewhere later!  I haven't got a working -current at the 
moment (I'll set one up): can anybody else verify?

More information about the Ukfreebsd mailing list