以从file1.txt和file2.txt中抽离出相同部分为例,注意:文件都是已经排好序的 grep -wf file1.txt file2.txt > same.txt 转载于:https://www.cnblogs.com/dakewei/p/9885068.html