Subject: Re: nawk strange behavior with regex in FS
To: tlaronde@polynum.com <tlaronde@polynum.com>
From: matthew sporleder <msporleder@gmail.com>
List: netbsd-users
Date: 07/01/2005 11:38:41
I thought this was a bug in your regex for a while, but after
obsessing about it a little and trying it out on solaris, I think
there's a bug in our nawk.  :)


On 7/1/05, tlaronde@polynum.com <tlaronde@polynum.com> wrote:
> Hello,
>=20
> I'm on NetBSD 2.0.2 (i386).
>=20
> Whether nawk(1) is behaving strangely or there is something that I
> definitively don't understand with awk when giving a regex for FS.
>=20
> Using gawk(1), I have the behavior I expect.
> nawk(1) doesn't handle correctly (on my installation at least) FS:
>=20
> Script started on Thu Jun 30 21:50:35 2005
> jordan% awk 'BEGIN { FS =3D " *: *"; } { print $1 "|" $2; }'
> 1:2
> 1|2
> 1:21
> 1|2
> 1 :add
> 1|a
> 1a:bdd
> 1a|
> 1a :bdd
> 1a|
> 1a :2dd
> 1a|
> jordan% gawk 'BEGIN { FS =3D " *: *"; } { print $1 "|" $2; }'
> 1:2
> 1|2
> 1:21
> 1|21
> 1 :add
> 1|add
> 1a:bdd
> 1a|bdd
> 1a :bdd
> 1a|bdd
> 1a :2dd
> 1a|2dd
> jordan% exit