Sample Header Ad - 728x90

Compare two files based on first column

1 vote
2 answers
2682 views
I have two files, and I would like to get a new file with only the lines that we have in the first file, but not in the second one. Example: file1: ID firstname lastname 1 John Wilkens 2 Andrea Smith 3 Matthew Freberg 4 Brenda Something file2: ID firstname lastname 1 John Wilkens 2 Andrea Willems 3 Jay Freberg 5 Mike Hart Output: ID firstname lastname 4 Brenda Something I tried using comm, but that also gives the rows where something was changed, so for example the ID 2 and 3. Can you please help me with this?
Asked by jazonpanczel (17 rep)
May 25, 2021, 10:42 AM
Last activity: May 26, 2021, 03:55 AM