Grep updated in Mandriva 2009.0
Par liberforce le mercredi 22 octobre 2008, 18:16 - Computers / Informatique - Lien permanent
Funny thing I saw today : grep version jumped from 2.5.1a in 2008.1 to 2.5.3 in 2009.0. Sounds useless, huh, grep does its stuff, so this should only be a bugfix or code cleaning release, don't you think ?
Well in fact, its not. Grep 2.5.3 introduces the long awaited option
--exclude-dir. You can now just grep your version control tree for
some stuff and easily exclude your .cvs/.svn/whatever directory, without having
to resort to a big fat find command with xargs.
Before :
find . -type f ! -path '*/.svn/*' -print0 | xargs -0 grep
foo
After :
grep -R --exclude-dir=.svn foo
*
It's sad that this option took several years to enter the code base (at least 2.5 years) and was first refused (this bug report is an example of how not to reply to users). Also, this new version of grep landed in 2009.0, but grep 2.5.3 was released in august 2007...
Mandriva Linux 2008.1 users interested by this feature can install the 2009.0 version of grep from their closest miror :
urpmi
ftp://ftp.proxad.net/pub/Distributions_Linux/MandrivaLinux/official/2009.0/i586/media/main/release/grep-2.5.3-6mdv2009.0.i586.rpm
Update : Don't do that at home kids if you're not sure, because mixing software from different releases can sometimes lead to nasty bugs
Commentaires
Well, I do not find the answer being so bad. The developer is polite, explain his decision, and in the spirit ( ie, "we want to avoid cluttering grep" ), it is quite similar to the gnome approach of simplicity. And he answered almost immediatly to the bug.
On another note, please , pretty please, do not tell to people to mix packages from 2009.0 and 2008.1, that's a bad habit to get. And yes, it may work now, and that the problem, people will get the erronous idea that this is safe and reliable, since this worked the first time.
Sure, the developer is polite. But why does he insist in refusing a feature that :
- a) has daily practical use for thousands of people
- b) has no side effect
- c) has a shorter syntax than the current state of things, and is less
error-prone
- d) is a good reason why many people across the web tell to use alternatives
to grep, like
- e) is just blatantly justified because
As on the mix of software versions, I agree with you, and I may have added a warning about that. However,ackfor example, because these projects don't lack that featuregrepalready has the-Roption. If file selection had to be the exclusive matter offind, this option would have to be banned for consistencygrepisn't exactly the piece of software with the most dependencies I've seen, and I'm faily confident it's small and low level enough to avoid any problems. It's not like I'm telling people to update the entire GNOME stack.