#!/usr/bin/env bash

email=$1
regex_email="^[A-Za-z0-9._+-]+@([A-Za-z0-9-]+\.)+[A-Za-z]{2,}$"

if [[ "$email" =~ $regex_email ]]; then
    echo "Email address $email is valid."
else
    echo "Email address $email is invalid."
fi

exit 0
