OS X v10.7 - egrep Doesn't Work

After a clean install of 10.7 I noticed that egrep is broken:

$ which egrep /usr/bin/egrep $ egrep --version egrep: conflicting matchers specified $ egrep a{2} egrep: conflicting matchers specified $ grep -E grep: conflicting matchers specified $ grep --version perl (GNU grep) 2.5.1 [snip license]

I updated to 10.7.2 in hope of a fix but nothing. Tried googling —nothing.

I'm fixin to install the latest version but this is quite an oddity. Any ideas?

Mac OS X (10.7.2)

Posted on Nov 20, 2011 11:02 PM

Reply
3 replies

Sep 5, 2016 3:46 AM in response to Danny Niu. Running a instance of Niux Unix operatig system.

Danny Niu. Running a instance of Niux Unix operatig system. wrote:


Why was it set? where was it set? was it set by default? what does it mean?


I'm a bit worried because I need a script of mine to work on both Solaris and OSX.

This is a 5 year old thread.


If you are having problems with grep or egrep maybe you should start a new post, and describe your problem.


I can tell you that I have a lot of shell scripts that run on OS X, Solaris, AIX, and Linux. I do not typically do anything fancy with egrep, but I do use it on occasion. With Solaris I have more problems with awk.


And for some of the non-POSIX commands I end up testing $(uname) and having platform specific conditional code.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

OS X v10.7 - egrep Doesn't Work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.