Xref: utzoo comp.unix.i386:655 comp.bugs.sys5:1157 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!gatech!emory!arnold From: arnold@mathcs.emory.edu (Arnold D. Robbins {EUCC}) Newsgroups: comp.unix.i386,comp.bugs.sys5 Subject: Re: 386/ix V2.0.2 breaks awk Message-ID: <4401@emory.mathcs.emory.edu> Date: 4 Oct 89 15:14:37 GMT References: <1456@redsox.bsw.com> <264@orchid.warwick.ac.uk> Reply-To: arnold@emory.UUCP (Arnold D. Robbins {EUCC}) Followup-To: comp.unix.i386 Organization: Math and Computer Science, Emory University, Atlanta GA Lines: 38 }In article <1456@redsox.bsw.com> campbell@redsox.bsw.com (Larry }Campbell) writes: }} A few weeks ago, I upgraded my 386/ix system from 2.0.1 to 2.0.2, and one of }} my nightly news administration scripts broke. The problem is caused by a }} bug in nawk, which in 2.0.2 seems to have become the standard awk. In article <264@orchid.warwick.ac.uk> bsrdp@warwick.ac.uk (H Boothroyd) writes: >A version of gawk gave me exactly the same problem here when I switched >a news script to it last week: [version deleted] > >However, an earlier MSDOS version has no problems with parsing the compound >pattern: [version deleted] > >From the evidence of the experience of Larry and me, in such widely >different >contexts, my provisional conclusions are: > * the parsing bug is a 1989 creation of awk/gawk programmers, > * the defective code is being copied around the awk/gawk world. The code is NOT being copied! That would totally destroy the GNU code, since it must be written without recourse to Unix source code. The truth is that both versions have the bug. It is also fixed in the latest versions of both nawk and gawk. Gawk 2.11 isn't released yet but should be out "shortly". A recent nawk can be gotten from the toolchest and a version that will be as up-to-date as possible will be in S5R4. It is not as easy as it looks to come up with a correct grammar for the AWK language. AWK is often a joy to use but a bear to implement. There are lots of dark corners and bizarre combinations of features just waiting to bite you. We (the gnu awk implementors) have been in constant communication with Brian Kernighan for almost two years; as a result both nawk and gawk have improved, and many small points have been clarified. -- Arnold Robbins -- Emory Information Technology Division | Laundry increases DOMAIN: arnold@emoryu1.cc.emory.edu | exponentially in the UUCP: gatech!emoryu1!arnold PHONE: +1 404 727-7636 | number of children. BITNET: arnold@emoryu1 FAX: +1 404 727-2599 | -- Miriam Hartholz