I have two files, test1 and test2. I would like to compare the files and remove any entries in test2 that are already present in test1.
Example:
test1
[ostrich@post-om1 test]$ cat test1|head
917010023586,UPE,RED 399
917023895388,UPE,RED 499
917023895389,UPE,RED 699
917024120800,UPE,RED 399
917024214387,UPE,RED 399
917027011096,UPE,RED 399
917027120457,UPE,RED 399
917027749420,UPE,RED 399
917030002266,UPE,RED 399
919389105220,UPE,RED 399
test2
[ostrich@post-om1 test]$ cat test2|head
917310106487
919839063308
917081106519
919389105220
919336429543
917081102867
919919804079
919936432138
919455329240
919839601519
Desired output
[ostrich@post-om1 test]$ cat test1
917010023586,UPE,RED 399
917023895388,UPE,RED 499
917023895389,UPE,RED 699
917024120800,UPE,RED 399
917024214387,UPE,RED 399
917027011096,UPE,RED 399
917027120457,UPE,RED 399
917027749420,UPE,RED 399
917030002266,UPE,RED 399
test2
; it removes lines fromtest1
...