I am trying to create a script that will use the position in column A ($1) in 48850.txt and search for it in columns B ($2) in gene.txt. Then when it finds a match it copies the text in column A ($1) and places it in column C ($3) of 48850.txt. I have attached the files. Thank you :).
The first position in 48850.txt is chrX:138982061 and that is between chrX: 13789061-13956831 (row 25325 in gene.txt) and the text in column A ($1) is GPM6B. So that text would be copied to column D ($4) of 48850.txt.
48850.txt
chrX:138982061 138982120 A_16_P21610256 GPM6B
Thank you :).