Tuesday 5 February 2013

grin - an alternative to grep

I sometimes have difficulty getting grep to do what I want it to do. Today I wanted to search all files in a directory and sub-directories for instances of a string. After having difficulty with grep, I went looking for a tool named 'ack' which was written in Perl and intended as a replacement for grep. This search somehow led me to the home page of a smilar tool written in Python. The tool is named 'grin' and can be found at http://pypi.python.org/pypi/grin.

grin was easy to install and very easy to use. I particularly found it useful to have the 'hits' highlighted.

Perhaps I could have done this all with grep but grin has done exactly what I wanted it to do, so I think I will continue using it. Those who disagree with just have to grin and bear it. Bah boom, tish! :D

No comments:

Post a Comment