![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I can't seem to pass variables properly into a nawk statement | DeCoTwc | Shell Programming and Scripting | 6 | 03-30-2008 03:07 PM |
| Reading Multiple Variables From a Single Line in Shell | Drek | Shell Programming and Scripting | 14 | 12-21-2006 11:20 AM |
| Variables within a sed statement | sirtrancealot | Shell Programming and Scripting | 5 | 07-18-2006 05:41 PM |
| echoing two variables in one statement | wxornot | Shell Programming and Scripting | 4 | 05-10-2006 12:57 PM |
| How can I put wildcards in an if statement that uses variables? | LordJezo | UNIX for Dummies Questions & Answers | 3 | 06-14-2004 01:27 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using two shell variables in single AWK statement
meas is a shell variable, and this works perfectly fine for me:
awk -v var=$meas -F, '$1==var' /abcd/efgh.txt > temp1.csv However, i want to introduce another shell variable, named, defnfile in the statement, in place of hardcoded path for efgh.txt like: awk -v var=$meas -F, '$1==var' $defnfile > temp1.csv This does not work.. So how does one define two shell variables in a single awk statement? |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|