Hello anonymous,

> grep -r index *.rb

this is a common misunderstanding.  The issue is that shell performs
the "expansion" of *.rb before grep starts.

The recursive search is, in genereal case, done by a special tool
named find/xargs:

find . -name '*.rb' |xargs grep index

But the re are also other alternatives, like grep's --include option
or Z shell and its recursive expansion
        grep -r index **/*.rb

And, BTW, this was not the right place to ask, you got this answer by
shere luck.

Regards,
        Stepan Kasal

Reply via email to