grep -r doesn't work on Solaris. You can only grep on files in the current directory.
grep -r
A workaround is to use grep with find:
grep
find
find ./ -type f -exec grep "foo" {} +