386/ix V2.0.2 breaks awk

Arnold D. Robbins {EUCC} arnold at mathcs.emory.edu
Thu Oct 5 01:14:37 AEST 1989


}In article <1456 at redsox.bsw.com> campbell at 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 at orchid.warwick.ac.uk> bsrdp at 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 at emoryu1.cc.emory.edu			| exponentially in the
UUCP: gatech!emoryu1!arnold  PHONE: +1 404 727-7636	| number of children.
BITNET: arnold at emoryu1	     FAX:   +1 404 727-2599	|   -- Miriam Hartholz



More information about the Comp.unix.i386 mailing list