Invoke `grep -E` instead of `egrep`.
Refactor case statements.