Dear All,
I would appreciate any help..At the moment, my work is stuck cos of my inability to resolve this issue.
Which is following:
I have two files with the arrngment like this
file-1
As you can see, the content in both files are SAME except the RED one.
But in this case, the DIFF command wont work..and I am puzzled. As the original such file has thousands of entries..
Plesae let me know how to get the REd marked files from the file-1 or the differenence of two files based on the matching of three column together.
Hi doganaym,
Thanks for the quick reply..the first two commands seem to be working...and the files are sorted..
But I am afraid even after neither third command as you provided worked nor the 'diff' command.
---------- Post updated at 04:17 PM ---------- Previous update was at 04:12 PM ----------
Hi again,
command is working all fine for the example file that I provided here.
Not sure, why its not working on my huge list of files..
Checking ! Thanks again for your help,
emily
---------- Post updated at 04:27 PM ---------- Previous update was at 04:17 PM ----------
I tried that as well, no use..
Somehow the file1 has 1636 entries and the second file has 1538 entries..differnce is of around ~100.
But the comm, diff, and your new command all are giving the final difference file with entries more than 2000.. thats annoying..not sure wats happening..
emily..
Sorry,to be precise, the difference is comign at the moment is 10556 entries..
Hi,
Thakns for the reply..
Unfortunately, on the main files, it is giving 10663 entries..though the differencce is around 100 in both files.
I did following, jst to mention:
Check file_2_diff file which will be having entries which is not present in file_1. and file_1_diff file which will be having entries which is not present in file_2.
awk 'NR==FNR{A[$0]=$0;next}{if(A[$0]){delete A[$0]}else{print > "file_2_diff"}}
END{for(i in A){if(A){print A > "file_1_diff"}}}' file1 file2