grep -E -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b" filename.txt
NOTE: The above command should be on one line.(You can also use egrep instead of grep with the -E switch)
egrep -o "\b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]+\b" filename.txt
From grep man pages:
-E = Interpret PATTERN as an extended regular expression.
-o = Show only the part of a matching line that matches PATTERN.
More info:
GREP MAN PAGE: http://ss64.com/bash/grep.html
GREP REGEX TUTORIAL: http://www.regular-expressions.info/grep.html