difference between the content of two files

后端 未结 4 1195
南笙
南笙 2020-12-06 02:58

I have two files one file subset of other and i want to obtain a file which has contents not common to both.for example

File1

apple
         


        
4条回答
  •  鱼传尺愫
    2020-12-06 03:18

    1 Only one instance , in either

    • cat File1 File2 | sort | uniq -u

    2 Only in first file

    • cat File1 File2 File2 | sort | uniq -u

    3 Only in second file

    • cat File1 File1 File2 | sort | uniq -u

提交回复
热议问题