Other tools that are better than grep

13 views
Skip to first unread message

Andy Lester

unread,
Jun 15, 2009, 9:34:42 AM6/15/09
to ack-...@googlegroups.com
One of the reasons I went with "betterthangrep.com" is because I
wanted to point people to other ack-like tools that are better than
grep, at least for their specific problem domain. Rak in Ruby is one
that immediately comes to mind.

I'd like to have a list of other BTG tools listed on BTG.com. I'm
thinking a sidebar down the side. My goal is not (only) to push ack
as an alternative to grep, but to wake people up to using other more
appropriate tools and to get out of their grep ruts.

Anyone want to take this on? Again, the btg.com source files are in
the ack repo, in the btg/ subdirectory.

Thanks,
xoxo,
Andy


--
Andy Lester => an...@petdance.com => www.theworkinggeek.com => AIM:petdance


Sitaram Chamarty

unread,
Jun 16, 2009, 7:04:14 AM6/16/09
to ack-...@googlegroups.com

On Mon, Jun 15, 2009 at 7:04 PM, Andy Lester <an...@petdance.com> wrote:
One of the reasons I went with "betterthangrep.com" is because I
wanted to point people to other ack-like tools that are better than
grep, at least for their specific problem domain.  Rak in Ruby is one
that immediately comes to mind.

for those using git as the VCS, "git grep" does a bang-up job.  The objective is similar, except it restricts the search (by default) to files that are tracked by git.  So -- automatically -- it doesn't search *.o, *.a, executables etc (which are often much larger than source code).  If you suffix it with a pattern like '*.c' it will search only *.c files (but to any depth).

It has some other power features (like helping to use negative matches effectively) over and above git integration and being able to grep old versions.

There was a very nice writeup about it somewhere; I'm trying to recall where exactly I saw it... if I do, I'll pass on the URL and you can put it in a "links" section or something.

Ovid

unread,
Jun 16, 2009, 8:15:37 PM6/16/09
to ack-...@googlegroups.com
On Tue, Jun 16, 2009 at 12:04 PM, Sitaram Chamarty<sita...@gmail.com> wrote:
>
> for those using git as the VCS, "git grep" does a bang-up job.  The
> objective is similar, except it restricts the search (by default) to files
> that are tracked by git.  So -- automatically -- it doesn't search *.o, *.a,
> executables etc (which are often much larger than source code).  If you
> suffix it with a pattern like '*.c' it will search only *.c files (but to
> any depth).
>
> It has some other power features (like helping to use negative matches
> effectively) over and above git integration and being able to grep old
> versions.
>
> There was a very nice writeup about it somewhere; I'm trying to recall where
> exactly I saw it... if I do, I'll pass on the URL and you can put it in a
> "links" section or something.

See: http://book.git-scm.com/4_finding_with_git_grep.html
Man: http://linux.die.net/man/1/git-grep

Cheers,
Ovid

Ori Avtalion

unread,
Jun 16, 2009, 8:32:26 PM6/16/09
to ack-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages