From owner-freebsd-current Tue Jul 16 14:44: 2 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 B66AC37B405 for ; Tue, 16 Jul 2002 14:43:58 -0700 (PDT) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12F7F43E64 for ; Tue, 16 Jul 2002 14:43:58 -0700 (PDT) (envelope-from crist.clark@attbi.com) Received: from blossom.cjclark.org ([12.234.91.48]) by sccrmhc02.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020716214357.VZEF6023.sccrmhc02.attbi.com@blossom.cjclark.org>; Tue, 16 Jul 2002 21:43:57 +0000 Received: from blossom.cjclark.org (localhost. [127.0.0.1]) by blossom.cjclark.org (8.12.3/8.12.3) with ESMTP id g6GLhuJK021874; Tue, 16 Jul 2002 14:43:56 -0700 (PDT) (envelope-from crist.clark@attbi.com) Received: (from cjc@localhost) by blossom.cjclark.org (8.12.3/8.12.3/Submit) id g6GLhtbw021873; Tue, 16 Jul 2002 14:43:55 -0700 (PDT) X-Authentication-Warning: blossom.cjclark.org: cjc set sender to crist.clark@attbi.com using -f Date: Tue, 16 Jul 2002 14:43:55 -0700 From: "Crist J. Clark" To: Garrett Wollman Cc: Robert Drehmel , current@FreeBSD.ORG Subject: Re: bug in awk implementation? Message-ID: <20020716214355.GE20381@blossom.cjclark.org> Reply-To: "Crist J. Clark" References: <20020715173747.A11802@alpha.develop.ferrari.net> <1026759240.7028.1.camel@hilfy.ece.cmu.edu> <20020715214709.A12624@alpha.develop.ferrari.net> <200207152000.g6FK0Tjt084098@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207152000.g6FK0Tjt084098@khavrinen.lcs.mit.edu> User-Agent: Mutt/1.4i X-URL: http://people.freebsd.org/~cjc/ 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 04:00:29PM -0400, Garrett Wollman wrote: > < said: > > > You are right. However, I still consider it a bug. :-) > > The standard says that the behavior is ``undefined''. That means that > you computer is allowed to turn into a frog. Actually doing something > useful is also permitted. And since it is clearly documented, awk(1) says, Records Normally, records are separated by newline characters. You can control how records are separated by assigning values to the built-in variable RS. If RS is any single character, that character separates records. Otherwise, RS is a regular expression. Text in the input that matches this regular expression will separate the record. However, in compatibility mode, only the first character of its string value is used for separating records. If RS is set to the null string, then records are separated by blank lines. When RS is set to the null string, the new- line character always acts as a field separator, in addi- tion to whatever value FS may have. It is not a bug. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message