I have long text files with space-delimited fields:
cat file1.txt
Id leng sal mon
25671 34343 56565 5565
44888 56565 45554 6868
23343 23423 26226 6224
77765 88688 87464 6848
66776 23343 63463 4534
cat file2.txt
Id number
25671 34343
76767 34234
23343 23423
66776 23343
cat output.txt
Id leng sal mon
44888 56565 45554 6868
77765 88688 87464 6848
file1.txt has four columns, file2.txt has two columns. I want to compare 1st column ($1) in both files (file1.txt, file2.txt) and output the file that did not match in file2.txt.
I have tried
join -v1 file1.txt file2.txt >output.txt
But the output has some errors. Any awk/sed command is appreciated.
