I've two files with data like below:
file1.txt:
AAA,Apples,123
BBB,Bananas,124
CCC,Carrot,125
file2.txt:
Store1|AAA|123|11
Store2|BBB|124|23
Store3|CCC|125|57
Store4|DDD|126|38
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be like below:
Store4|DDD|126|38
i.e. after comparing the field2 of file2.txt with field1 of file1.txt, if there is any entry missing in file1.txt, that needs to be returned on screen
Do you have any easy approach to achieve this with an one liner using awk?