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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to