From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: Geoff Collyer To: 9fans@cse.psu.edu Subject: Re: [9fans] awk bug In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Mon, 15 Sep 2003 03:04:35 -0700 Topicbox-Message-UUID: 36fd883c-eacc-11e9-9e20-41e7f4b1d025 I'm not sure if `$f[0]' should work as you intend (maybe `($f)[0]' is the right parse), but parentheses can fix things to work as you intend: ; echo a b c | awk 'BEGIN { f[0] = 2 } { print $(f[0]) }' b