【Bash】差集合

大学1年くらいでやるやつ (覚えてない)

sort $set1_file_path $set2_file_path $set2_file_path | uniq -u

実行例

$ cat a
1
2
3
4
5
6

$ cat b
1
3
5

$ sort a b b | uniq -u
2
4
6

参考: bash, Linux: Set difference between two text files – Stack Overflow