Linux/grep

source: http://www.robelle.com/smugbook/regexpr5.txt

grep '^From: ' /usr/mail/$USER            {list your mail} grep '[a-zA-Z]'        {any line with at least one letter} grep '[^a-zA-Z0-9]       {anything not a letter or number} grep '[0-9]\{3\}-[0-9]\{4\}' {999-9999, like phone numbers} grep '^.$'              {lines with exactly one character} grep '"smug"'                {'smug' within double quotes} grep '"*smug"*'           {'smug', with or without quotes} grep '^\.'        {any line that starts with a Period "."} grep '^\.[a-z][a-z]' {line start with "." and 2 lc letters}