Skip to content
Archive of entries posted on 23rd May 2006

color grep

Every once in awhile I come across a feature of a piece of software, generally, a small utility that I hadn’t known about and that shows immediate value.  Today Jon showed me the --color flag for GNU grep.  It uses color to highlight the term you were searching for in the line returned.  For example:

# grep –color=auto -i metadata todo.txt
Metadata Functions to Move:
   MetadataView…Make sure only our indexed items are passed up.

Its a very simple thing, but one of those that I’m surpised I haven’t been using.  I know have a shell aliases for that.  See the grep documentation for more information.

[Update 6/2: linux.com has a great article on GNU grep's new features which talks about the color.  One that I'm particularly expected about is the ability to use Perl-style regular expressions.]

Where is your Howie Mandel now?

So, last night I was inspried by NBC’s Deal or No Deal (which is still the dumbest name ever) to ask Mark the important question of: Porn or No Porn?

He replied:

well, there’s 300 billion sites out there, but if i open up one site, i might see a man doing another man and uh let me see what my friends think