extracting unique values between 2 sets/files

前端 未结 8 1219
粉色の甜心
粉色の甜心 2020-11-29 19:44

Working in linux/shell env, how can I accomplish the following:

text file 1 contains:

1
2
3
4
5

text file 2 contains:



        
8条回答
  •  遥遥无期
    2020-11-29 20:40

    here's another awk solution

    $ awk 'FNR==NR{a[$0]++;next}(!($0 in a))' file1 file2
    6
    7
    

提交回复
热议问题