|
@@ -17,11 +17,11 @@ cp "$db_file" "$db_file.backup"
|
|
#
|
|
#
|
|
# Name: Som E. Name
|
|
# Name: Som E. Name
|
|
# Email: address@example.com
|
|
# Email: address@example.com
|
|
-mapfile -t contacts < <(grep -Fxf- -v "$excluded" < <(find ${form_dir} -type f -name "*.txt" -exec awk -F ":" '
|
|
|
|
|
|
+mapfile -t contacts < <(find ${form_dir} -type f -name "*.txt" -exec awk -F ":" '
|
|
/Name:/ { name = $2 } /Email:/ { email = $2 } END {
|
|
/Name:/ { name = $2 } /Email:/ { email = $2 } END {
|
|
printf "%s <%s>\n", substr(name,2), substr(email,2)
|
|
printf "%s <%s>\n", substr(name,2), substr(email,2)
|
|
}
|
|
}
|
|
-' {} \;))
|
|
|
|
|
|
+' {} \; | grep -Fx -f "$excluded" -v)
|
|
|
|
|
|
|
|
|
|
# Loop through the contacts array and add each contact to the mailing list
|
|
# Loop through the contacts array and add each contact to the mailing list
|