Given a text file
input that contains list of phone numbers (one per line).
Write a bash script to print all valid phone numbers.You may assume that a valid phone number must appear in one of the following two formats:
You may also assume each line in the text file must not contain leading or trailing white spaces.
987-123-4567 123 456 7890 (123) 456-7890
987-123-4567 (123) 456-7890
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.