Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!sdcsvax!ucsdhub!esosun!seismo!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: Strange behaviour of awk Message-ID: <1085@auspex.UUCP> Date: 27 Feb 89 19:03:08 GMT References: <497@eutrc3.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 14 >The AWK book says that "when one of $1, $2, etc., is changed, $0 is >reconstructed using OFS to separate fields". So it's definitely a >bug. However, unless you are using System V, you probably have old >awk which may have bugs that have been fixed in new awk. Our (SunOS >4.0) old awk suffers the same bug. The SunOS 4.0 "awk" is based on the S5R2 one (mainly because it's significantly faster than the version of "old awk" that comes with 4.xBSD); this means it's quite likely that *every* version of "old awk" has the problem in question. I hesitate to call it a "bug" unless some documentation on "old awk" says $0 is reconstructed; the AWK book describes only "new awk", and describes a *lot* of stuff that doesn't work in "old awk" because it wasn't in "old awk".