grep -r doesn't work on Solaris. You can only grep on files in the current directory.
grep -r
Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!
A workaround is to use grep with find:
grep
find
find ./ -type f -exec grep "foo" {} +