又两个grep的替代品: Rak和Grin

看这个意思,各种语言都要把grep重新实现一遍:

Rak
http://rak.rubyforge.org/

引用Rak is a grep replacement in pure Ruby. It accepts Ruby syntax regular expressions and automatically recurses directories, skipping .svn/, .cvs/, pkg/ and more things you don't care about. It is based on the Perl tool ack by Andy Lester.



Grin
http://pypi.python.org/pypi/grin/

引用A grep program configured the way I like it.

I wrote grin to help me search directories full of source code. The venerable GNU grep and find are great tools, but they fall just a little short for my normal use cases.

...Also, I was bored. It seems to be catching. Perl has ack, Ruby has rak, and now Python has grin

grin比ack好的一点是,ack缺省是按编程语言扩展名来搜的,一些它不识别的编程语言就得重新定义,所以常常临时需要用ack -a,而grin跟grep的行为比较一致,没有这个问题。

参见: grep的两个替代品(ack & glark) - 巴蛮子 - 博客园

posted @ 2012-08-21 18:58  巴蛮子  阅读(1747)  评论(0编辑  收藏  举报