Article View: comp.unix.shell
Article #1868A question on [a,ga,na]wk.
From: Binod K. Taterway
Date: Wed, 28 Nov 1990 15:52
Date: Wed, 28 Nov 1990 15:52
20 lines
1210 bytes
1210 bytes
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}}' <source-file>
# 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
Technical Details
Message-ID:
<BT00.90Nov28155200@PL118d.?>Path:
arc1-ca.pugleaf.net!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!bt00Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <BT00.90Nov28155200@PL118d.?> Date: 28 Nov 90 15:52:00 GMT Sender: news@lehi3b15.csee.Lehigh.EDU Distribution: comp.unix.shell Organization: /home/PL118a/bt00/.organization Lines: 20