I have an input file1 of two columns(tab-separted):
c1\tc2
aaa\t232 65 19 32
bbew\t32 22 20
jhsi\t986 1 32 463 221
And input file2 which have one column:
c1
19
1
32
277
what I want is to search an element from file2 in file1, and return the corresponding value in c1. If there is more than one matched value, then return all together in one column.
Here is what should the output file be like:
19 aaa
1 jhsi
32 aaa bbew jhsi
277
277 would be left empty because it does not exist.
Any suggestion will be helpful.