Are there any duplicate file comparisons? Compare the data in each row of two txt files. for example, are there any duplicates in the 1.txt 808274826542267532829575417850170591968784 file?
Compare the rows of data in the two txt files.
For example:
1. txt
As shown in the following figure, check whether the data in each row in "1.txt" and" 2.txt "is repeated first,
After that, are there any duplicates in the sum of 1.txt and 2.txt data?
------ Solution --------------------
The simplest way is to read both files into an array and then use array_diff
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service