Write a bash script that finds all the invalid email addresses.
For simplicity, assume that a vaild email addresses has the following rules-
local@domain.comlocal part email address.The following characters are valid in the local part of the email as long as they are not the first character.
-, _, +, .
Domain name can only contain alphanumeric characters and -.com part can have atmost one ., for e.g. co.uk or co.in is valid but as.df.gh is invalidExample:
Assume that input has the following content:
abc@example.co.uk
abc@example.com
abc<>@example.com
abc@example@gmail.com
Your script should output the following:
abc<>@example.com
abc@example@gmail.com
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.