文件过滤

awk 'NR==FNR{a[$1];next}($1 in a)' tmp2.txt tmp1.txt    

 

awk 'NR==FNR{a[$1];next}{if($1 in a)next;print $0}' tmp2.txt tmp1.txt 

 

paste file1 file2 | column -s $'\t' -t

posted @ 2016-06-20 16:39  野百合  阅读(91)  评论(0)    收藏  举报