Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site opus.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!floyd!cmcl2!seismo!hao!cires!nbires!opus!rcd
From: rcd@opus.UUCP (Dick Dunn)
Newsgroups: net.bugs.4bsd
Subject: Re: 4.2 awk difference
Message-ID: <540@opus.UUCP>
Date: Mon, 11-Jun-84 20:29:32 EDT
Article-I.D.: opus.540
Posted: Mon Jun 11 20:29:32 1984
Date-Received: Wed, 13-Jun-84 02:27:39 EDT
References: <502@rocksvax.UUCP>
Organization: NBI, Boulder
Lines: 20

>DESCRIPTION:
>	4.2 awk fails to modify $0 when one of $1, $2, ... is modified.  The awk
>distributed with 4.1 handles the case below as documented.
>...
>POSSIBLE SOLUTION:
>	The action of 'print $0' can be performed by 'for (i=1;i<=NF;i++)
>printf "%s " $i;'.  Thus one still has the full capability of the old awk.
>Since the documentation is slightly unclear about $0 when changed as a
>side-effect it might be better to just delete this feature from awk.  In other
>words simply change the documentation.

The documentation isn't at all unclear.  See the cover page of the awk
document in Vol 2A - it illustrates with:
	{$1 = log($1); print}
which, it states, "replaces the first field of each line by its algorithm".

The 4.2 behavior is definitely a bug which needs fixing.
-- 
Dick Dunn	{hao,ucbvax,allegra}!nbires!rcd		(303)444-5710 x3086
	...Cerebus for dictator!