From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aharon Robbins Message-Id: <200309151144.h8FBiFuc032196@skeeve.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] awk bug In-Reply-To: Cc: Date: Mon, 15 Sep 2003 14:44:15 +0300 Topicbox-Message-UUID: 371d8b78-eacc-11e9-9e20-41e7f4b1d025 In article you write: >brahma% echo a b c | awk 'BEGIN { f[0] = 2 } > { print $f[0] } > ' >awk: syntax error at line 2 > context is > { print >>> $f[ <<< >awk: illegal statement at line 2 >brahma% echo a b c | awk '{ print $2 }' >b This is a bug that was introduced when BWK switched from the lex scanner to a hand-written one. (Guess who told him about it? :-) It's fixed in the current version: $ echo a b c | nawk 'BEGIN { f[0] = 2} > { print $f[0] }' b $ nawk -V awk version 20030731 Arnold