From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653669621761.tru64-unix-managers.marc@archive.invalid> From: "Nemholt, Jesper Frank" Date: Mon, 06 Aug 2001 12:01:29 +0000 To: tru64-unix-managers Subject: SUMMARY (final) : grep -w bug in 4.x but not in 5.x X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653669621761 Just to finish the story : The grep -w bug described below (and yes it's bug, not a XPG feature) = is now fixed in patch kit 6 for 4.0F and patchkit 3 for 4.0G. I have no idea about 4.0A-E. -- =20 Un saludo / Venlig hilsen / Regards Jesper Frank Nemholt Unix System Manager Compaq Computer Corporation Phone : +34 699 419 171 E-Mail: JesperFrank.Nemholt@compaq.com=20 > -----Original Message----- > From: Nemholt, Jesper Frank=20 > Sent: Wednesday, June 20, 2001 8:32 PM > To: tru64-unix-managers@ornl.gov > Subject: SUMMARY: grep -w bug in 4.x but not in 5.x >=20 >=20 > Hi! >=20 > As written in my question at the end, I asked about a strange=20 > behavior of grep -w. > I got several answers, most of them stating that they had=20 > same experience in various versions of Tru64 v4.x, from 4.0D=20 > to 4.0G patchkit 2. > One stated it worked OK in Tru64 4.0F patchkit 5, but 2 other=20 > said the opposite. >=20 > Octave Orgeron appeared to have in-depth knowledge about the=20 > issue and gave me this answer : >=20 > Hi Jesper, >=20 > You are correct about the function of grep under 4.x vs. 5.x.=20 > What happened here, is that the XPG compliant grep is the=20 > default in 5.x, so the behavior is different. The same thing=20 > happened in Solaris 7, which is why it acts like 5.x. I=20 > believe that in order to get the same behavior in 4.x you=20 > have to use the SV4 utils which are on the Associated=20 > Products cd. For the > vast majority of Unix's, they are all going through the=20 > process of changing their compliantness from SV4 or BSD to=20 > the Posix XPG standards. Which is good in the long run of=20 > things. In Tru64, you'll notice that since 5.x came out,=20 > there are more SV4'isms about the commands and the devices,=20 > which conforms to the XPG standards if I remember correctly.=20 > So all in all, it's > a good thing:) >=20 >=20 >=20 > I'll check out the SV4 version and consider using this=20 > instead. Another possible solution is to use grep -x, but I'm=20 > not sure this will be accepted by the people using it since=20 > they prefer to use same syntax across Solaris & Tru64 in=20 > their scripts. >=20 > I think I'll probably also open a support case at CPQ, since=20 > the man page description according to my (limited) english=20 > knowledge is wrong. What it describes is the functionality=20 > found in v5.x, not the functionality found in v4.x. >=20 > /Jesper >=20 > > -----Original Message----- > > From: Nemholt, Jesper Frank=20 > > Sent: mi=E9rcoles, 20 de junio de 2001 1:15 > > To: tru64-unix-managers@ornl.gov > > Subject: grep -w bug in 4.x but not in 5.x > >=20 > >=20 > > Hi! > >=20 > > Make a file (test.txt) containing : > >=20 > > 3 > > 33 > > 333 > > 3333 > >=20 > >=20 > > Then do a : > >=20 > > cat test.txt | grep -w 3 > >=20 > >=20 > > On 4.0F patchkit 4 and 4.0D patchkit something, grep returns=20 > > all lines. > > On 5.1 patchkit 3 grep returns only the first line. The same=20 > > happens on > > Solaris 7. > >=20 > > I believe grep -w in 5.1 and Solaris 7 is behaving correct=20 > > according to the > > man description, and wrong on 4.x. > >=20 > >=20 > > Fixed in any patch, or ? > >=20 > >=20 > > /Jesper > >=20 >=20