If you have no suitable xargs, you'll need to invoke grep on each file name separately:

find /some/dir -type f -exec grep -H PATTERN {} \;

If you have find but it doesn't have -exec, and your file names are tame (no newlines or \[*?), and your shell supports command substitutions (i.e. ash and not hush), and there aren't too many files to consider, you can generate the list of file names with find and pass that as an argument to grep.

set -f
IFS='
'
grep PATTERN $(find /some/dir -type f)
set +f

If there are many files, you can use a for loop over all the files (still ash-only because of the command substitution).

But if you don't have find, you're probably on a very limited system where the shell is hush, which lacks functions. You can simulate functions with eval. I'll assume you have test; if you don't, detecting directories is possible but painful.

Actually, my BusyBox find does accept -exec ... +, though it treats it the same as -exec ... \;. Not sure if this is a configurable option. Not very useful, but it does make some scripts written for other systems a bit more portable.
–
dubiousjimJan 14 '13 at 2:46