Subject: Re: bug#27730: --exclude-dir does ignore subdirectory

From: Paul Eggert <[email-masked]>
Date: Mon, 17 Jul 2017 18:03:03 -0700

This does not appear to be a bug, in that grep is operating as documented. When 
searching recursively, --exclude-dir=GLOB will "skip any subdirectory whose base 
name matches GLOB. Ignore any redundant trailing slashes in GLOB." In your case, 
GLOB contains a non-redundant trailing slash, and such a pattern cannot match 
any base name.

To get the behavior that you want, you can use a fancier tool like 'find'.