Shell variable in AWK
|
Original Message
|
Name: dk0871
Date: December 23, 2004 at 13:45:58 Pacific
Subject: Shell variable in AWKOS: Sun OS 5.6CPU/Ram: Not Known |
Comment: I need some help of how to use shell variable in awk '{action}' section? Tried several way doesn't seem to be get it right. Thanks in advance. dkr
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Borvix
Date: December 24, 2004 at 08:41:33 Pacific
Subject: Shell variable in AWK |
Reply: (edit)It is subject to whole lesson ”how”, but I think you may find this link to be useful. http://www.vectorsite.net/tsawk.html Learn more at www.TechnoProfessor.com
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: nails
Date: December 29, 2004 at 07:53:10 Pacific
Subject: Shell variable in AWK |
Reply: (edit)I prefer to pass shell variables to an awk script, but this little stub embedds one: VAR=5 echo "test" |awk '{ print "'"$VAR"'" }'
Regards, Nails
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: