grep Regular Expressions . - matches any character * - matches zero or more of last item + - matches one or more of last item ^ - matches at start of line $ - matches at end of line [...] - matches any character inside [^...] - matches any character not inside \ - removes special meaning from next char For more info: man grep