Wouldn't it be better to atleast let -r behave like ever and change -R?
Anyone ever used -R here? :)
Wouldn't it be better to atleast let -r behave like ever and change -R?
Anyone ever used -R here? :)
/me updates rgrep alias to use -R
New features should get new options; they should not move old features to new flags and put the new features on the old flags. Nuts.
I don't think distros should be afraid to break compatibility with main if main is making a change that makes no sense. Breaking essential and classic *nix functions defeats the purpose of CLI utilities.
Hi, I don't agree. Different versions of a tool showing different behaviour for the same option is enough for me; the same version of the tool showing different behaviour for the same option _depending on the distribution_ ... I feel that's too much!
It's going to be hard enough switching between a machine that only gets critical updates and a machine with the same distro but getting all updates. Grep has been around since 1973, is there any serious Unix scripter who feels it still needs more features?
Solaris, HP-UX and OpenServer have not.
AIX is weird:
> -r Searches directories recursively. By default, links to directories are followed.
> -R Searches directories recursively. By default, links to directories are not followed.
Hence, only lubutu's comment ("-R is the recursion flag for ls, cp, rm, etc") is true, while _delirium ("-R is the POSIX-standard flag for recursive grep") is wrong, which means AIX is free to do whatever it wants with both the -r and the -R flags.
But I started using -R today, in the middle of a WTF event while inspecting some Python files, digging up a Debian bug report, inspecting the upstream change and posting this to HN.
I still think it's not the best idea for Debian (or any other system) to break compatibility with upstream, since this will lead to different behaviors on different systems, not only depending on version and vendor (GNU or *BSD). But of course, it could also lead to the change being reverted, which would be welcome (guess nobody relies on the new behavior yet).
The POSIX argument is definitely valid, but nevertheless GNU's grep has always supported -r and BSD versions do as well (although OpenBSD's man page reads "This implementation supports those options; however, their use is strongly discouraged."), so it just unnecessarily breaks existing stuff.
Not to say that this is a good or bad change.
-R matches the -R in chown/chgrp
They should really introduce -r for those two to NOT follow symlinks. Following symlinks for those is bad.