I have 2 files for example :
file 1:
1 azer 4
2 toto 0
3 blabla 8
4 riri 9
5 coco 2
file 2:
1 azer 4
2 toto 0
3 blabla 8
I want to compare the two files, and if the lines in the file 2 are in the file 1, I want to remove those lines from the file 1. For example :
Output:
4 riri 9
5 coco 2
I tried this command but it show me only the similarities :
awk 'NR==FNR{a[$2];next} $1 in a {print $0}' merge genotype.txt
Does any one know how to do this ? I tried it in awk but if it's possible to do this in R or python it's good too.