BASH again.
You may assume that a valid phone number must appear in one of the following two formats: (xxx) xxx-xxxx or xxx-xxx-xxxx. (x means a digit)
we may need to use regex? therefore the regex in the shell!
grep -P means Perl regex!
we can grep a file directly.