DEV Community

Prathamesh Sonpatki
Prathamesh Sonpatki

Posted on

Installing GNU grep and find on OS X

brew install grep
brew install findutils
Enter fullscreen mode Exit fullscreen mode

After that update your .bashrc or .zshrc with following to setup the paths correctly.

# .bashrc/.zshrc
export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"
Enter fullscreen mode Exit fullscreen mode

That's all!

Top comments (0)