Any fancy grep utility replacements out there?

Floris Bruynooghe floris.bruynooghe at gmail.com
Fri Apr 4 07:36:53 EDT 2008


On Mar 19, 2:44 am, Peter  Wang <misterw... at gmail.com> wrote:
> On Mar 18, 5:16 pm, Robert Kern <robert.k... at gmail.com> wrote:
>
>
>
> > samsli... at gmail.com wrote:
> > > So I need to recursively grep a bunch of gzipped files.  This can't be
> > > easily done with grep, rgrep or zgrep.  (I'm sure given the right
> > > pipeline including using the find command it could be done....but
> > > seems like a hassle).
>
> > > So I figured I'd find a fancy next generation grep tool.  Thirty
> > > minutes of searching later I find a bunch in Perl, and even one in
> > > Ruby.  But I can't find anything that interesting or up to date for
> > > Python.  Does anyone know of something?
>
> > I have a grep-like utility I call "grin". I wrote it mostly to recursively grep
> > SVN source trees while ignoring the garbage under the .svn/ directories and more
> > or less do exactly what I need most frequently without configuration. It could
> > easily be extended to open gzip files with GzipFile.
>
> >    https://svn.enthought.com/svn/sandbox/grin/trunk/
>
> > Let me know if you have any requests.
>
> And don't forget: Colorized output! :)

I tried to find something similar a while ago and found ack[1].  I do
realise it's written in perl but it does the job nicely.  Never needed
to search in zipfiles though, just unzipping them in /tmp would always
work...

I'll check out grin this afternoon!


Floris

[1] http://petdance.com/ack/




More information about the Python-list mailing list