Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!mailrus!ames!hc!lll-winken!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.unix.questions Subject: Re: accessing shell variables from within awk? Message-ID: <448@quintus.UUCP> Date: 20 Sep 88 07:59:38 GMT References: <473@diamond.unix.ETA.COM> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Distribution: na Organization: Quintus Computer Systems, Inc. Lines: 13 In article <473@diamond.unix.ETA.COM> rscott@eta.unix.ETA.COM (Rich Scott) writes: > > How can I access a shell variable (to wit, a few environment >variables) from within "awk"? Try awk -f script var=value... var=value file... This is in the SunOS manual page, and worked on a 4.2 system which didn't have it in the manual page. Or use a temporary file: cat >$$.awk <