Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • About how many lines are you talking? Are both files the same size or is one rather small? Commented Aug 13, 2013 at 15:58
  • 1
    Can fields 4 and 5 be more than one character long? Do you mean that you want to check whether the set intersection of {file1:fields 4,5} and {file2:fields 4,5} is not empty? Why do you mention field 6, since it doesn't seem to fit into your matching algorithm? Do you care about the order of the lines in the output? (Writing a precise problem description is the first step to writing a program.) Commented Aug 13, 2013 at 17:37
  • Is there a typo in your 3rd line of your sample output? The bit from the 2nd file shows "G T", but your sample output shows "G G". Commented Aug 13, 2013 at 20:00
  • @ott: No both files do not have the same number of lines. Commented Aug 14, 2013 at 10:19
  • @slm : No, in the output file there is no typo. The File 2 has s2/90 60 . G G 97 N=2 F=5;U=4 and s2/90 60 . G T 55 N=2 F=5;U=4. But the output file should have the one before "G G" because the Logic is if column 1 and 2 matches exactly then it goes to column 4 and 5. If column 4 and 5 of file 1 has "X Y" then from file2 it should only capture those with "X X" or "Y Y". Commented Aug 14, 2013 at 10:29