The old-fashioned way.
You won't get much joy running "grep -r" on SunOS, but our forefathers got by just fine with:
# find . -type f | while read file > do > echo $file > grep WHATEVERYOULIKE $file > done
This is not terribly efficient, but luckily modern SPARC processors have advanced considerably, even if modern Solaris "grep" has not.