Date: Tue, 16 Jul 2002 14:43:55 -0700 From: "Crist J. Clark" <crist.clark@attbi.com> To: Garrett Wollman <wollman@lcs.mit.edu> Cc: Robert Drehmel <robert@ferrari-electronic.de>, current@FreeBSD.ORG Subject: Re: bug in awk implementation? Message-ID: <20020716214355.GE20381@blossom.cjclark.org> In-Reply-To: <200207152000.g6FK0Tjt084098@khavrinen.lcs.mit.edu> References: <Pine.LNX.4.44.0207150812080.27685-100000@smtp.gnf.org> <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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 15, 2002 at 04:00:29PM -0400, Garrett Wollman wrote: > <<On Mon, 15 Jul 2002 21:47:09 +0200, Robert Drehmel <robert@ferrari-electronic.de> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020716214355.GE20381>