Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!wuarchive!cs.utexas.edu!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell Subject: Re: Awk question Message-ID: <1991Jan21.193628.18834@convex.com> Date: 21 Jan 91 19:36:28 GMT References: <681@silence.princeton.nj.us> <1991Jan20.232154.29651@convex.com> <585@fciva.FRANKCAP.COM> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: usa Organization: CONVEX Software Development, Richardson, TX Lines: 24 Nntp-Posting-Host: pixel.convex.com From the keyboard of dag@fciva.UUCP (Daniel A. Graifer): :In article <1991Jan20.232154.29651@convex.com> I said: :>:I've never been able to find a way to use a variable on the right-hand :>:side of a ~ expression with any of the incarnations of awk. Have I :>:missed something? :> :>Hmm, now that you mention it, there's no way for awk to distinguish :> :> if (myarray[i] ~ /foo/) :> :>is the literal or the variable foo. : :$ nawk 'BEGIN{ Ah, a _nawk solution. Shoulda known. :-) I had perl two years before I got gawk, and the awk on my system is still the old one. thanks, -tom -- "Hey, did you hear Stallman has replaced /vmunix with /vmunix.el? Now he can finally have the whole O/S built-in to his editor like he always wanted!" --me (Tom Christiansen )