I want to do something like
if ($2 in another file) { print $0 }
So say I have file A.txt which contains
aa
bb
cc
I have B.txt like
00,aa
11,bb
00,dd
I want to print
00,aa
11,bb
How do I test that in awk? I am not familiar with the tricks of processing two files at a time.