awk oddity: 2.8BSD vs. ULTRIX

David P Huelsbeck dph at lanl.ARPA
Mon Sep 22 20:03:05 AEST 1986


In article <268 at uwmacc.UUCP> jwp at uwmacc.UUCP (Jeffrey W Percival) writes:
>Here's a curiosity I hope someone can help me on.
>I have a file called "cmd" with this line:
>
>    { $1 = $2 + $3 } { print $0 }
>
>and a file called "data" with this line:
>
>    1 1 1 1
>
>When I type this command:
>
>    awk -f cmd data
>
>I get these responses:
>
>    2 1 1 1                 on 2.8BSD on an 11/70
>
>and
>
>    1 1 1 1                 on ULTRIX 32m v. 1.1 on a MicroVax II
>                            and on 4.2BSD on a Vax 780.
>
>Why does awk vary in its response?
>-- 
>	Jeff Percival ...!uwvax!uwmacc!sal70!jwp or ...!uwmacc!jwp

Because awk under 4.2 is broken and ULTRIX works too much the same.
This is fixed in 4.3 and SysV.

	dph at lanl.arpa



More information about the Comp.unix.wizards mailing list