News for hackers. Stuff that matters.
Re:GNU grep 2.12 changes behavior of recursion options, brea... by leif on Thursday July 26, 2012 @09:33AM (#4295851)
Yeah, for habitual reasons I usually use -R. No idea why.
Re:GNU grep 2.12 changes behavior of recursion options, brea... by lubutu on Thursday July 26, 2012 @09:45AM (#4295905)
In POSIX -R is the recursion flag for ls, cp, rm, etc. So if you want to recurse, -R is probably a safer bet than -r. (ls -r just lists in reverse.)
Re:GNU grep 2.12 changes behavior of recursion options, brea... by buster on Thursday July 26, 2012 @09:53AM (#4295939)
Yeah, that may be it.. I'm wondering why they didn't just add a new option (aka --no-symlinks) or something
Re:GNU grep 2.12 changes behavior of recursion options, brea... by a3_nm on Thursday July 26, 2012 @02:23PM (#4297720)
Annoying exception: scp only accepts -r as recursion flag, not -R.
Re:GNU grep 2.12 changes behavior of recursion options, brea... by wildmXranat on Thursday July 26, 2012 @10:09AM (#4296020)
Same here. I've been conditioned to use -R
Re:GNU grep 2.12 changes behavior of recursion options, brea... by mturmon on Thursday July 26, 2012 @04:53PM (#4298660)
Good point. Also, since you reminded me, chmod, chown, chgrp.
Re:GNU grep 2.12 changes behavior of recursion options, brea... by leif on Thursday July 26, 2012 @09:48AM (#4295919)
that's probably it
Re:GNU grep 2.12 changes behavior of recursion options, brea... by adavies42 on Thursday July 26, 2012 @11:34AM (#4296507)
ever work on a non-gnu box? (old solaris, *bsd, stock os x, etc.) there's a decent chance they don't have -r at all.
Re:GNU grep 2.12 changes behavior of recursion options, brea... by cschramm on Thursday July 26, 2012 @11:43AM (#4296566)
*BSDs have (=> OS X probably too).

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.

Re:GNU grep 2.12 changes behavior of recursion options, brea... by rbanffy on Thursday July 26, 2012 @05:27PM (#4298836)
Isn't the AIX behavior the one POSIX specifies?
Re:GNU grep 2.12 changes behavior of recursion options, brea... by cschramm on Friday July 27, 2012 @12:27AM (#4300018)
Looking at MattJ100's link (http://pubs.opengroup.org/onlinepubs/009695399/utilities/gre...), it seems like POSIX grep actually does not have any recursion.

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.

Re:GNU grep 2.12 changes behavior of recursion options, brea... by lmm on Thursday July 26, 2012 @06:04PM (#4298994)
That would be kind of perverse given how cp behaves for -r and -R