Luchita

Ezra -ez- Nugroho’s blog

Better Than Grep: ack

Posted on | October 9, 2009 | 3 Comments

This morning I was thinking about people that I am indebted to, possibly forever. Linus Torvalds is definitely one, not just because of the kernel, but also because he is a good role model.

In terms of tools, I am certainly indebted to Joseph H. Allen, for his own editor.

I also thought of ‘grep’ as a tool that I cannot (couldn’t ?) live without. Although, it’s a bit hard to trace it’s first creator.

But ‘grep’, like it’s mother ‘ed’, has problems. I’ve been content with it for the longest of time, and never thought that anything better was around.

A few months back, a friend of mine mentioned in IRC about a tool, ‘ack’, to be better than ‘grep’.  At that time I didn’t need to search for anything, and just shoved it up the closet.

But today, I needed to do a major pattern matching to fix some Unicode issues, and grep just gave me too many false positives from backup files and svn directories. It was horrible, so much that I needed to google “better than grep” (I had forgotten the name of the tool..).

Dooh, did I really miss something out. Ack not only removes false positives, goes recursive by default, but also color codes the result! I was so blown away, I had to blog about it.

So Andy Lester, I am indebted to you! For those who’ve never tried ack, check it out here: http://betterthangrep.com/

Comments

3 Responses to “Better Than Grep: ack”

  1. Andy Lester
    October 9th, 2009 @ 8:15 pm

    You’re very welcome. I’m glad you’ve found it so useful. Thanks for spreading the word.

  2. vim search multiple files - Amit Agarwal
    January 5th, 2010 @ 8:43 am

    [...] Better Than Grep: ack (ezran.org) [...]

  3. Determine what process is listening on a port on Solaris, without lsof - Amit Agarwal
    January 14th, 2010 @ 9:40 am

    [...] Better Than Grep: ack (ezran.org) [...]

Leave a Reply





*

  • Tags

  • Meta

  • Liking what you read?

    Add to Technorati Favorites
     
     
  • TSC