Has anyone seen the changes with grep 2.20-3 with RHEL 6.7

Latest response

My developer came to me this morning asking if there were patches applied. Naturally there were. We applied updates to go from RHEL 6.6 to RHEL 6.7. One package update was "grep". We moved up from "grep" version 2.6.3-6 to version 2.20-3.

The developer had a script which would, by default, seem to ignore directories in the "grep" results. With the newly applied update "grep" would find subdirectories and spit out "Is a directory" message for every directory found. Though both grep versions' man page indicate this should have happened it did not for the older version.

It's difficult to find anyone talking about this since the word "grep" is all over the place on the Internet. I also saw nothing at the GNU "grep" web site specifically noting this change.

So, it was a very simple fix, simply use the argument "-d skip" to skip or ignore the "Is a directory" outputs. Problem solved.

I found this interesting and was curious if anyone had run into this before. I think "grep" is like electricity in America, we take it for granted, until something goes wrong.

Responses

I have also upgraded RHEL 6.6 to RHEL 6.7 and didn't notice a difference in grep. There were 388 packages upgraded so not easy to know what's changed. It's good to know that I'm not the only person struggling in the dark, my Google-fu is not good and try as I might, didn' t spot all the difference. I use grep frequently but only to filter out patterns on the command line.

You're right about taking things for granted, there's a lot of tools which I've used but haven't explored in depth : sed, awk, grep.

It's difficult to search on a term like "grep" that probably in every linux example question on the Net. Even the package's changelog failed to reveal a change, but then again I didn't go track down each bug number either. If you don't know already (I tend to forget it) you can see all package changelogs from an RPM or installed package.

To see grep's changelog:

    rpm -q --changelog grep | more

Cool tip, thanks.

Some of our application people got hit by these changes. egrep and fgrep have changed from discrete binaries to a shell wrapper.
A few scripts were doing the old ps -ef | egrep | egrep -v egrep trick which broke.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.