# Give up now if the file isn't a database dump
[[ $file =~ $pattern ]] || exit 0
# Save the year and date from the file name
year="${BASH_REMATCH[1]}"
# Give up now if the file isn't a database dump
[[ $file =~ $pattern ]] || exit 0
# Save the year and date from the file name
year="${BASH_REMATCH[1]}"