source: https://stackoverflow.com/a/221929/22132012
Why is it possible to use:
grep -rinHI --exclude={\*.h} pattern
And:
grep pattern -r --include=\*.cpp --include=\*.h rootdir
Both statements above print the expected results. But this command does not print anything:
grep -rinHI --include={\*.h,\*.cpp} pattern
The solution is, as @Eric pointed out in the comments:
grep -rinHI --include=\*.{h,cpp} pattern