Grep in Mac OS X's terminal -- only displaying one color
As Ignacio already said, OS X grep is a bit outdated (it's version 2.5.1). You can install the latest GNU grep though.
As always, you can install most missing Linux tools on OS X through Homebrew:
brew install grep
This will install ggrep
so as not to override your existing grep
. If you want to change that, see the info message:
All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc like:
PATH="$(brew --prefix)/opt/grep/libexec/gnubin:$PATH"