Even though the person below me already mentioned this, I felt it needed point out again: You can use any expression with grep, not just a regular expression, so if your testing for equality, use the equality test operator, don't try to coerce a regex in to pretending to be one.