
文件1
0000_aaa_b0001_bccc_b0002_bcc <------ file2 have not that line0003_aaa_d0006_xxx...
文件2
0000_aaa_b0001_bccc_b0003_aaa_d0006_xxx...解决方法 这是comm命令的用途:
$comm -3 file1 file20002_bcc
来自man comm:
DESCRIPTION Compare sorted files file1 and file2 line by line. With no options,produce three-column output. Column one contains lines unique to file1,column two contains lines unique to file2,and column three contains lines common to both files. -1 suppress column 1 (lines unique to file1) -2 suppress column 2 (lines unique to file2) -3 suppress column 3 (lines that appear in both files)总结
以上是内存溢出为你收集整理的linux – 获取不在file2中的file1行全部内容,希望文章能够帮你解决linux – 获取不在file2中的file1行所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)