In bash,
grep -r --exclude={*.c,} 'HELLO' // exclude c files grep -r --include={*.c,} 'HELLO' // just same with grep -r 'HELLO' What's the problem?
You are using curly braces incorrectly. The correct syntax would look like
grep -r --include='*.c' 'HELLO' . (Notice also the addition of the missing file name argument . at the end.)
You can see what's going wrong by putting an echo in front and examining what the shell expands the braces to.
$ echo grep -r --exclude={*.c,} 'HELLO' grep -r --exclude=*.c --exclude= HELLO GNU grep will search current directory with -r active when filename argument isn't given