Use ack to search code

I needed something to search codebase with and after trying to do

sudo gem install rak

and rak installed like that is a little flaky. Probably something missing but I didn’t want to spend time researching, so ack to the rescue.

ack is perl utility to search codebase.

In ubuntu install is super simple.

sudo apt-get install ack-grep

however on OSX things usually require more work. Here is how to install ack on OSX that worked for me (Snow Leopard)

download it: curl http://betterthangrep.com/ack-standalone > ~/ack
make it executable: chmod 0755 ack
move it to bin so it would be in path: sudo mv ack /usr/local/bin/

enjoy.

more info at http://betterthangrep.com/

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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