Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是问题:我有两个文件:
文件1:
aaa bbb ccc ddd
文件2:
bbb ddd
如何使用 DIFF 获得此输出(仅差异)
aaa ccc
如果您想要的是 file1 独有的记录,那么:
$ comm -23 <(sort file1) <(sort file2) aaa ccc