Hi,
I would like to cross-match 2 files with awk using different columns. Example:
file1 with 3 CSV columns:
A1,B1,C1
1,2,3
4,5,6
7,8,9
file2 similary:
A2,B2,C2
2,11,13
7,34,56
8,32,12
Matching 2 files using B1 column of the first file and A2 column of the second should give:
A1,B2,C1,A2,B2,C2
1,2,3,2,11,13
7,8,9,8,32,12
It is important to keep headerof these files in the resulting file as shown in the above example.
Could anybody help me with this?
tkanks
k.
I would like to cross-match 2 files with awk using different columns. Example:
file1 with 3 CSV columns:
A1,B1,C1
1,2,3
4,5,6
7,8,9
file2 similary:
A2,B2,C2
2,11,13
7,34,56
8,32,12
Matching 2 files using B1 column of the first file and A2 column of the second should give:
A1,B2,C1,A2,B2,C2
1,2,3,2,11,13
7,8,9,8,32,12
It is important to keep headerof these files in the resulting file as shown in the above example.
Could anybody help me with this?
tkanks
k.