Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.shell Subject: Re: using /bin/sh vars in awk Message-ID: <1991Apr29.122714.17138@athena.mit.edu> Date: 29 Apr 91 12:27:14 GMT References: <27814@neptune.inf.ethz.ch> <1695@targon.UUCP> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 14 In article , maki@void.jit.dec.com (Watanabe Maki) writes: |> If your awk is nawk(New Awk), it's easy. |> |> ... | nawk '{if ($1 == fred) command}' fred="barney" Actually, this syntax will work with nearly any version of awk, not just nawk. It was available, albeit undocumented, in even the earliest distributed versions. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710