查找文件2的间隔中是否包含文件1的数字间隔/查找2个间隔是否相交并打印

时间:2018-12-09 16:27:45

标签: linux bash shell scripting multiple-columns

2个文件中的给定间隔代表基因位置。 我需要知道File1中是否包含一些File1的间隔

文件1:

GBKPosition

247 381
378 1781
1884 2987
3008 3103
3128 4405
4479 5081
5102 6229
6253 8670
8742 9269
------etc etc----------
6867573 6868586   
----rest of the column-             

文件2:

Phaster_positions

371860 418565
2947108 2988239
4663633 4680174
5756724 5793879
5794433 5829445
6867447 6901202 

例如,File1的最后一个间隔是68675736868586。我们可以看到File2的间隔6867447 6901202中包含了这个间隔。因此,我必须找到这些匹配项并将其打印出来。

0 个答案:

没有答案
相关问题