Has anyone seen the changes with grep 2.20-3 with RHEL 6.7
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
