Hi Everyone
I am new to Unix shell scripting
Can anyone please explain me in detail how this command works
awk -F@ 'NR==FNR{A[$1]=$2;next}$3 in A{$3=A[$3]}1' file2 file1
The above command I got it from this forum, but unable to implement it as I am not getting how this works:mad:
I have two files abc.txt and xyz.txt
abc.txt
1,2,3,4
5,6,7,8
9,0,1,2
xyz.txt
2,1
6,2
2nd column of first file should be compared with 1st column of second file, it match is found, 4th colmn of first file should be updated with the second column of the second file
Output should be
1,2,3,1
5,6,7,2
9,0,1,2
Please provide me command and explaination.
Thank you for your help in advance.