Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!lll-winken!cert!netnews.upenn.edu!vax1.cc.lehigh.edu!lehi3b15!lehi3b15.csee.lehigh.edu!bt00 From: bt00@PL118d.? (Binod K. Taterway) Newsgroups: comp.unix.shell Subject: A question on [a,ga,na]wk. Keywords: awk, gawk, nawk, csh Message-ID: Date: 28 Nov 90 15:53:23 GMT Sender: news@lehi3b15.csee.Lehigh.EDU Distribution: comp.unix.shell Organization: /home/PL118a/bt00/.organization Lines: 20 Is it possible to make use of c-shell variables in [g,n]awk scripts. What I need to do some thing like this: #!/bin/csh set AWK=/usr/local/bin/gawk set date=`date +%m/%d/%y` # Now the awk script that uses $date: $AWK -F: '{if ($3 == $date) {print $0}}' # End of shell script. I checked with [g,n]awk. Only gawk can access environment variables, but I do not want to do "setenv date= ..", just "set date= ..". Any suggestions? Or, am I stuck with using setenv? Thanks in advance. /Binod. -------------------- Binod Taterway bt00@pl118a.cc.lehigh.edu | bt00@lehigh.bitnet User Consultant, Lehigh University, Bethlehem, PA 18015 (215) 758-3984