Issue
I have 7 files and would like to compare the first column of file1. I want to print the row if the first column's name from file1 does not appear in any other files.
file 1
peter 10 300
Xavier 12 30
Jack 123 67
Ram 34 57
Jancy 56 34
Thomson 56 67
file2
Jack 23 67
peter 12 39
file3
Jack 123 67
peter 15 45
Thomson 35 430
I would like to get the following output
Xavier 12 30
Ram 34 57
Jancy 56 34
Your suggestions would be appreciated. Thank you.
Solution
$ awk 'FILENAME != "file1" {a[$1]; next} !($1 in a)' file[2-6] file1
Xavier 12 30
Ram 34 57
Jancy 56 34
Answered By - ufopilot Answer Checked By - Marie Seifert (WPSolving Admin)