grep -w bug in 4.x but not in 5.x

From: Nemholt, Jesper Frank <JesperFrank.Nemholt_at_compaq.com>
Date: Wed, 20 Jun 2001 00:15:14 +0100

Hi!

Make a file (test.txt) containing :

        3
        33
        333
        3333


Then do a :

        cat test.txt | grep -w 3


On 4.0F patchkit 4 and 4.0D patchkit something, grep returns all lines.
On 5.1 patchkit 3 grep returns only the first line. The same happens on
Solaris 7.

I believe grep -w in 5.1 and Solaris 7 is behaving correct according to the
man description, and wrong on 4.x.


Fixed in any patch, or ?


/Jesper
Received on Tue Jun 19 2001 - 23:14:09 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT