ack: A grep for programmers

I am vastly undequalified to speak about ack, since the home page makes it abundantly clear that it’s a perl-based grep-like tool intended for programmers.

I am not a programmer, unless an emergency arises, and then there would be a better chance of success by employing a blind, one-armed, drunk monkey to smack at a keyboard for a few hours. I am quite confident of that.

But ack is on my list and I’d feel slightly guilty if I didn’t include it, since it was relayed to me by email from a reader (who asked to remain nameless). So here is my best attempt at ack, and the wizardry it reportedly can perform.

2014-08-30-6m47421-ack

Let’s see. Color? Check. Easily readable output? Check. Searches entire tree? Check. Returns results with file and line number annotated? Check.

Well then, that’s my whole list.

As I understand it (because again, this is not a tool intended for the peons, like me) ack is supposedly faster or more complete than the traditional grep, and carries defaults specific to searching trees of source code files.

Not that grep can’t do those things. …

2014-08-30-6m47421-ack-vs-grep

Only that ack supposedly does them better. Or at least that’s the impression I get from the Web site.

Like I said, I’m not a programmer so I don’t feel qualified to pick between the two. I have no preference for either, and I’m likely to stick with grep just because grep appears on my Arch system (and some others) by default.

I can be lazy that way. :roll:

About these ads

6 thoughts on “ack: A grep for programmers

  1. Pingback: Links 31/8/2014: Linux 3.12.27, Akademy 2014 | Techrights

  2. Scott

    I rather enjoy using ack. As the ack man page suggests – “Ack is designed as a replacemnt for 99% of the uses of grep”. I don’t have to be a “power regex user” to get information out of grep.

    I would encourage others to at least try it.

    Reply
  3. Pingback: ngp: Find it and edit it, in one deft motion | Inconsolation

  4. Pingback: the_silver_searcher: Intergalactic searcher smackdown | Inconsolation

  5. Pingback: cscope: The code navigator | Inconsolation

Leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s