GNU bug report logs - #47649
grep bug report - improper handling of file symlinks with -r option

Previous Next

Package: grep;

Reported by: Chris Drake <cryptophoto <at> gmail.com>

Date: Thu, 8 Apr 2021 02:11:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Chris Drake <cryptophoto <at> gmail.com>
Cc: 47649 <at> debbugs.gnu.org
Subject: bug#47649: grep bug report - improper handling of file symlinks with -r option
Date: Sat, 7 Aug 2021 11:19:04 -0700
On Sat, Aug 7, 2021 at 4:43 AM Chris Drake <cryptophoto <at> gmail.com> wrote:
> Looks like the -r and -R got mixed up?
>
> What is now the "-R" behaves the same way as the original "-r", and now the new "-r" behaves differently.
>
> For backwards-compatibility, the original behaviour should have been preserved, and the new feature assigned to a new switch ?

Hi Chris,

There was no mix-up, and this is not new.
This was a deliberate decision that dates back to 2012 (first release
with it was 2.12).
Sorry this causes you difficulty, but at least one other grep
implementation has -r and -R options that work this way:

https://www.freebsd.org/cgi/man.cgi?query=grep




This bug report was last modified 3 years and 283 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.