workaround systems without grep -q