grep recursive with wild card not working

grep, linux

Solution

You can use the include flag:

grep -r --include="*.mk" 9900 .

grep manual page says:

--include : If specified, only files matching the given filename pattern are searched.

Problem

``` $ grep -r 9900 *.mk grep: *.mk: No such file or directory $ grep -R 9900 *.mk grep: *.mk: No such file or directory $ grep -V GNU grep 2.5.4 ``` am I using a wrong grep? or what is the syntax? Thanks!

Original source