From owner-freebsd-current Mon Jul 15 8:47:29 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 505A937B4A9; Mon, 15 Jul 2002 08:47:23 -0700 (PDT) Received: from alpha.develop.ferrari.net (host1.ferrari-electronic.de [62.159.79.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 259CE43E67; Mon, 15 Jul 2002 08:47:20 -0700 (PDT) (envelope-from robert@ferrari-electronic.de) Received: (from robert@localhost) by alpha.develop.ferrari.net (8.11.6/8.11.6/SuSE Linux 0.5) id g6FFbls11830; Mon, 15 Jul 2002 17:37:47 +0200 Date: Mon, 15 Jul 2002 17:37:47 +0200 From: Robert Drehmel To: Gordon Tetlow Cc: current@FreeBSD.org Subject: Re: bug in awk implementation? Message-ID: <20020715173747.A11802@alpha.develop.ferrari.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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