tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: grep -w bug in 4.x but not in 5.x
@ 2001-06-20 18:32 Nemholt, Jesper Frank
  0 siblings, 0 replies; only message in thread
From: Nemholt, Jesper Frank @ 2001-06-20 18:32 UTC (permalink / raw)
  To: tru64-unix-managers

Hi!

As written in my question at the end, I asked about a strange behavior =
of
grep -w.
I got several answers, most of them stating that they had same =
experience in
various versions of Tru64 v4.x, from 4.0D to 4.0G patchkit 2.
One stated it worked OK in Tru64 4.0F patchkit 5, but 2 other said the
opposite.

Octave Orgeron appeared to have in-depth knowledge about the issue and =
gave
me this answer :

Hi Jesper,

You are correct about the function of grep under 4.x vs. 5.x. What =
happened
here, is that the XPG compliant grep is the default in 5.x, so the =
behavior
is different. The same thing happened in Solaris 7, which is why it =
acts
like 5.x. I believe that in order to get the same behavior in 4.x you =
have
to use the SV4 utils which are on the Associated Products cd. For the
vast majority of Unix's, they are all going through the process of =
changing
their compliantness from SV4 or BSD to the Posix XPG standards. Which =
is
good in the long run of things. In Tru64, you'll notice that since 5.x =
came
out, there are more SV4'isms about the commands and the devices, which
conforms to the XPG standards if I remember correctly. So all in all, =
it's
a good thing:)



I'll check out the SV4 version and consider using this instead. Another
possible solution is to use grep -x, but I'm not sure this will be =
accepted
by the people using it since they prefer to use same syntax across =
Solaris &
Tru64 in their scripts.

I think I'll probably also open a support case at CPQ, since the man =
page
description according to my (limited) english knowledge is wrong. What =
it
describes is the functionality found in v5.x, not the functionality =
found in
v4.x.

/Jesper

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-20 18:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-20 18:32 SUMMARY: grep -w bug in 4.x but not in 5.x Nemholt, Jesper Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox