[英]Output line from file1 if not found in file2
I need to output the lines from file1 that are not found in file2, ideally using linux commandline. 我需要从file1中输出在file2中找不到的行,最好使用linux命令行。
Both files are uppercase AZ, sorted, per-file unique, and contain only one word per line. 这两个文件均为大写AZ,已排序,每个文件都是唯一的,并且每行仅包含一个单词。 Typically, file1 is between 5 and 100 lines long, file2 is 250,000 lines long. 通常,file1的长度在5到100行之间,file2的长度在250,000行之间。 Processing speed is not an issue. 处理速度不是问题。
grep -vhFxf file1 file2
效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.