25 July 2013


It's not a bug, it's a feature ;-).

02 July 2013

Ack is Better Than Grep

_   /|
   U    ack!
Several years ago I discovered ack from hackernews or somewhere like that. If you are a grep user, then you will love ack. Check out Better Than Grep to learn all about it. Ack written in Perl and, therefore, uses Perl regular expressions so it's damn fast compared to grep. So fast it's actually shocking. Below are some steps I used to install it via MacPorts. Please note that I was unable to find it after it was installed so I had to resort to manually creating a symlink to it in my ~/bin directory.
$ sudo port install p5-app-ack
$ which p5-app-ack
$ # No output from which -- so where is it??? 
$ sudo port list p5-app-ack
p5-app-ack                     @2.40.0         perl/p5-app-ack
$ # Well it did install something, so let's look at the contents of the package 
$ sudo port contents p5.12-app-ack
Port p5.12-app-ack contains:
$ # Aha! There it is in /opt/local/libexec. I will just symlink to it and be done. 
$ ln -s /opt/local/libexec/perl5.12/ack ~/bin/ack
$ ls -l ~/bin/
total 8
lrwxr-xr-x  1 bruce.snyder  128844131  31 Jul  3 15:32 ack -> /opt/local/libexec/perl5.12/ack
$ ack --version
ack 2.04
Running under Perl 5.12.4 at /opt/local/bin/perl5.12

Copyright 2005-2013 Andy Lester.

This program is free software.  You may modify or distribute it
under the terms of the Artistic License v2.0.
$ # Now I'm good :-) 
Happy Ack'ing.