我有两个包含email_id的文件。1. Test1.txt 2. Test2.txt
Test1.txt的内容是:
[email protected] [email protected] [email protected]
Test2.txt的内容是:
[email protected] [email protected] [email protected] [email protected]
这里[email protected]是Test1.txt和Test2.txt之间的通用ID。我想从这2个文件中找出此类ID,然后将其插入一个文件中。
请提出建议。我只需要在这两个文件之间通用的ID。
尝试:
awk 'NR==FNR{A[$1]; next} $1 in A' file1 file2 > file.new
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句