Path: utzoo!attcan!uunet!lll-winken!ames!purdue!tut.cis.ohio-state.edu!ucbvax!hplabs!hpl-opus!steinbac From: steinbac@hpl-opus.HP.COM (Gunter Steinbach) Newsgroups: comp.unix.questions Subject: Re: variables in awk Message-ID: <63720003@hpl-opus.HP.COM> Date: 27 Apr 89 19:06:50 GMT References: <10029@burdvax.PRC.Unisys.COM> Organization: HP Labs, High Speed Electronics Dept., Palo Alto, CA Lines: 18 I didn't look up any book passages, but I quickly tried the following in K-shell: nawk '{a="x"; if($1 ~ a) print "match"}' asd xyz asx And sure enough, the last two input lines produced a "match" output. So no problemo! However, I also tried the above with the "old" awk, and it produces a "syntax error near line line". So you need the AT&T toolbox "nawk". Hope this helps you -- Gunter Steinbach Hewlett-Packard Labs gunter@hpl-opus