This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Compare one of the columns of two seperate files and write the raw of the second file next to first file if match.

What I want to do is that I have two files File1.txt and File2.txt. I want to compare third column in File1.txt and second column in File2.txt. If found a same value write the raw of the second file next to the corresponding raw of the first file (if not remain empty, or put ".")

Thank you for your answers.

File1.txt

1    2    A   3
4    5    A   6
7    8    B   9
10   11   C   12

File2.txt

13   A   16
14   B   17
15   D   18

Output.txt

1    2    A   3    13   A   16
4    5    A   6    13   A   16
7    8    B   9    14   B   17
10   11   C   12   .    .   .
genome next-gen-sequencing

People are wondering where to answer, when they have seen a same question 2 times asked by one person :)

I understand, how can I delete this post

There is a moderate option below your post, go there and find delete

0 answers

No answers yet.

Log in to answer this question.