![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Reading Of Array Element in Unix | ravi_rn | Shell Programming and Scripting | 2 | 12-30-2008 02:48 PM |
| Reading from while loop into an array | ssuresh1999 | UNIX for Dummies Questions & Answers | 2 | 08-12-2008 11:53 AM |
| combining fields in two text fields | shocker | Shell Programming and Scripting | 3 | 01-16-2008 11:27 AM |
| split varibles and store fields into shell varible array | gratus | Shell Programming and Scripting | 3 | 10-11-2007 02:50 PM |
| Reading data into muti-dimentional array - in perl | zap | Shell Programming and Scripting | 5 | 05-04-2004 10:15 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
awk reading many fields to array
I want to read $3,$4,$5,$6,$7 of fileA in array and when
fileb $1 = fileA $4 the i want to print array and few fields from fileB. This should work but has some syntax error. Code:
nawk -F, 'FNR==NR{a[$1]=[$3,$4,$5,$6,$7];next} a[$4]{print a[$4,$1,$2,$3]}' fileB fileA
Appreciate if someone can correct this. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|