Is it possible to copy the rows of File1 and File2 in a new File4 following the instruction given by File3 by using a simple bash script (sed? awk?).
File1: /*two or more columns, tab delimited*/
AC 456324
DC 689712
GH 123677
KL 236587
File2: /*two or more columns, tab delimited*/
DC AABBC TTYJU
AC DDDEE YYUKI
KL GGHHG QQSSD
File3: /*one column*/
AC
DC
File4 /*tab delimited*/
AC 456324 DDDEE YYUKI
DC 689712 AABBC TTYJU
I'm actually performing this using Python dictionaries, and I wondered if you knew a simple way out.
Note: this question, in its simplest form, has already an answer in: Merging file by row