Date: Mon, 15 Jul 2002 17:37:47 +0200 From: Robert Drehmel <robert@ferrari-electronic.de> To: Gordon Tetlow <gordon@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: bug in awk implementation? Message-ID: <20020715173747.A11802@alpha.develop.ferrari.net> In-Reply-To: <Pine.LNX.4.44.0207150812080.27685-100000@smtp.gnf.org> References: <Pine.LNX.4.44.0207150812080.27685-100000@smtp.gnf.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 15, 2002 at 08:20:58AM -0700, Gordon Tetlow wrote:
> I was parsing ldif format with awk (formerly gawk) and found a buglet in
> awk with the following script:
>
> BEGIN {
> RS="\n\n";
> FS="(: |\n)";
> }
>
> { print $2; }
>
> Fed the following output:
>
> dn: Some Such DN
> gidNumber: 1000
> uidNumber: 1080
>
> dn: Some Other DN
> gidNumber: 1000
> uidNumber: 1405
>
> This is what I get:
>
> one-true-awk:
>
> Some Such DN
> 1000
> 1080
>
> Some Other DN
> 1000
> 1405
Ok.
>
> gawk:
>
> Some Such DN
> Some Other DN
>
Oh.
> So, this seems to be a bug in the one-true-awk implementation. Any ideas
> on how to fix this?
To me, this seems like a bug in 'gawk'. The AWK language uses
only the first character in RS as the record separator, to my
knowledge.
ciao,
-robert
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020715173747.A11802>
