Hey guys newb here... Here is what I'm trying to do
File1
AAA
BBB
CCC
File2
xxx xxx xxx xxx xxx AAA
xxx xxx xxx xxx xxx BBB
xxx xxx xxx xxx xxx CCC
if $1 of File 1 matches $6 of File 2 then print matching $0 of File 2 .....
I've tried catting File2 into an array and ran a matching pattern to $6 on File2 but I am having serious syntax issues.... Is this a proper start?
cat File2 | awk ' {x[$0]=$6} END {if($1 = x[$0]=$6) print $0} ' File1
Im trying super hard to grasp awk but I dont think I'm built for it
...... Thanks for any suggestions....