[英]match data range from file1 with file2
I have two files, namely file1.txt and file2.txt which contain data as follows: 我有两个文件,分别为file1.txt和file2.txt,其中包含如下数据:
file1.txt file1.txt
953503-955502
1284493-1286492
2158134-2160133
2564482-2566481
2983742-2985741
4713105-4715104
6259680-6261679
....
file2.txt file2.txt
245201276-245202076
245201286-245202086
245201302-245202102
245201323-245202123
245201338-245202138
245201344-245202144
....
Both files have more than 3000 data. 这两个文件都有3000多个数据。
In this set, I want to match from the range of data from file1.txt
within the range of data from file2.txt
and get the output in a new file. 在此集合中,我想从file1.txt
的数据范围内匹配file2.txt
的数据范围,并在新文件中获取输出。
How can I match the range of data from the files. 如何匹配文件中的数据范围。 Please give me some suggestions. 请给我一些建议。 Thanks in advance for your kind help! 在此先感谢您的帮助!
Use diff, its a build in linux command. 使用diff,它是在linux命令中构建的。 Very smart 很聪明
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.