replace grep [...] > /dev/null with grep -q

+ use `-q` option for `grep` instead of redirecting stdout to `/dev/null`.