Spotlight On Glark

by pat eyler

One of the ideas that came up on the Ruby web page redesign list was a rotating set of application and library spotlights. The idea didn't take root, but Martin DeMello produced this spotlight on glark, which I'm posting here with his permission.

I've often joked that the ruby community seems to produce far more libraries than it does actual applications. One of my favourite exceptions is glark, a command line utility that does everything you've always wished grep did, and some things you might not even have thought to wish for.

The glark project page introduces it as

A replacement for (or supplement to) the grep family, glark offers: Perl compatible regular expressions, highlighting of matches, context around matches, complex expressions (``and'' and ``or''), and automatic exclusion of non-text files.

Even with just the first of these features, glark would have been invaluable — indeed, the majority of the time, I use it as nothing more than a PCRE-enabled grep. However, that's definitely not all there is to it - glark has a plethora of features that I might not use every day, but which are extremely handy when I do need them. Here's a quick look at some of the more useful ones.


2006-09-05 07:42:46
If you use Darwinports on Mac OS X you can also sudo port install glark.