Is it possible to copy the whole rows of File1 in a new File3 following the instruction given by File2 by using a simple bash script using sed or awk?File1: /*two or more columns*/AC    456324DC    689712GH    123677KL    236587File2: /*one column*/ACDCFile3: AC    456324DC    689712I'm actually performing this using Python dictionaries and I wondered if you knew a simple way out.
Merging files by rows
shell script;text processing;columns;join
With grepgrep -Ff File2 File1With awkawk 'NR==FNR {a[$1]++;next} a[$1]' File2 File1