use variables for grep and egrep to enable Solaris 11 acceptance tests

Solaris 11 doesn't understand the grep options used in the test script. It doesn't have the posix xpg tools. Use GREP and EGREP variables and on Solaris 11, use the gnu tools.
You could alternatively do this by over-riding grep and egrep with functions on Solaris:
```
if ... test for SunOS ...
then
    grep () { ggrep "$@"; }
    egrep () { gegrep "$@"; }
fi
```
Then the rest of the code just uses grep and egrep as before, without needing a change to $GREP and $EGREP.
Of course, this only works in the present script; if you want to run grep and egrep in a script generated and run by this one, you'll need to include the same function definitions in the generated script (but you can still do the conditional in this script, so that the generated script simply defines the functions unconditionally).  Or you can `export -f grep egrep` if the scripts are bash scripts (not sure about that for plain sh).