combine the greps into a single grep -q, then eliminate the [ and `.