[comp.unix.questions] 2.8BSD awk question: Oooh, I get it!

jwp@uwmacc.UUCP (Jeffrey W Percival) (11/26/86)

I get it!  I answered my own question.

In awk, only fields are referred to with a leading $...
$0 is the whole line, $1 is field 1, and so on.
My variable was called "header", so the correct statement is

	print header

not

	print $header

I guess $header was being evaluated as $0, so the observed output makes sense.

I guess I get the Emily Litella award for today...  Never mind!
-- 
	Jeff Percival ...!uwvax!uwmacc!sal70!jwp or ...!uwmacc!jwp