I am looking for an efficient way to achieve set difference from 2 files. I do know that
grep -vxF -f setA setB gives me B - A. This is what I want, but my files are as follows:
setA: 2 4 5 6 set B: 1 123 2 abc 3 def 4 hij
I want the set difference to be calculated based on the first column of set B; hence the expected output for B - A would be:
1 123 3 def
Any pointers on how to achieve this?