Given file1:
13 abcd 5 facd 7 dcga 14 avsd
and file2:
7 x 5 c 14 a 13 i
I would like to sort file1 based on the same order of the first column in file2 so that the output is as follows:
7 dcga 5 facd 14 avsd 13 abcd
Is it possible to do this in bash, or should I use some "higher" language like python?
source share