fanyuchao

1. 取出两个文件的并集(重复的行只保留一份)
  cat file1 file2 | sort | uniq


2. 取出两个文件的交集(只留下同时存在于两个文件中的文件)
  cat file1 file2 | sort | uniq -d


3. 删除交集,留下其他的行
  cat file1 file2 | sort | uniq –u

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-11-24
  • 2021-12-26
  • 2021-09-07
  • 2021-12-04
  • 2021-12-22
  • 2021-10-19
猜你喜欢
  • 2021-11-27
  • 2021-11-29
  • 2021-09-07
  • 2021-12-16
相关资源
相似解决方案