I have 2 files and I would need to create a third file containing the columns 1 and 3 of the first file, but only with the values from the 1st column that appear on the 2nd column of the 2nd file. My first file, filename.txt is like this:
16052618 9.7078062447 0.0123386217370137
118913 9.7138922111 0.0221107973013803
While my second filename.bim is like this:
2 2:115035 0 115035 C T
2 2:118913 0 118913 T C
So for instance I would need to extract the 2nd row of the first file and print it in another file together with the relative 3rd column.
Basically it's like an --extract I would do in Plink software, but I can't manage to do with text files.
Thank you