I'm a quite absolute beginner on awk and I will appreciate any help to solve the following problem.
I have two different files, each of these with three columns.
File A (A1, A2, A3) and File B (B1, B2, B3)
The syntax would be as follows:
If A1 == B1 and A2 == B2, then print A1, A2, A3, B4
If not, do nothing
Thank you very in advance for the help you can provide me.
regards
first of all, thank you very much for your help. In order to print A1, A2, A3 (first three columns from FileA), B3 (third column from File B), I have tried to edit the script modified by ahmad.diab as follows:
NR==FNR{a[$1]=$1;b[$2]=$2;next} ($1 in a) && ( $2 in b ) { print a[$1],b[$2],$3,$3 } FileA FileB
But what I obtained is A1, A2, B3, B3. No way to print A3....