workaround for versions of grep without -q (quiet) option

Please be gentle; this is my first pull request. :-)