I have four different files: file1, file2, file3, file4. Each file has 2 different columns separated by tab. I want to match first column of file1 (as reference) with the first column of second file, third and fourth file and print first column which is matching and second column of each file which has matching first column. files look like:
file 1
Bm1_00085|Bm1_22625 0.263974289
Bm1_00087|Bm1_22620 0.663443490
file 2
Bm1_00085|Bm1_22625 0
Bm1_57630|Bm1_52870 0
file 3
Bm1_57630|Bm1_54855 0
Bm1_00085|Bm1_22625 4
file 4
Bm1_57630|Bm1_52870 0
Bm1_00085|Bm1_22625 1
output:
Bm1_00085|Bm1_22625 0.263974289 0 4 1