- 论坛徽章:
- 0
|
我有文件1,有400MBytes,很大,里面格式为时间在内容:
-----------文件1--------------
......
2012.07.08 this is an sample text
2012.06.04 find this string
2011.09.09 get this one
2001.10.18 thank you all
2001.06.14 find this string
2003.07.07 get this one
......
-------------------------
文件2里面存有我需要寻找的字符串,
-----------文件2-------------
find this string
get this one
-----------------------------
我需要一个脚本,能够从文件1里面取得所有文件2中有的字符串的行,也就是
$脚本 文件1 文件2
最后能得到结果
-----------结果-------------
2012.06.04 find this string
2011.09.09 get this one
2001.06.14 find this string
2003.07.07 get this one
----------------------------
不知道像awk适合处理这么大的文件不?或者有谁能用perl帮我写一个。谢谢大家了。 |
|