Browse Source

logic error swapped exclusions and patterns

Daniel Sheffield 1 năm trước cách đây
mục cha
commit
91eeea075c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      update-evolution-mail-list.sh

+ 2 - 2
update-evolution-mail-list.sh

@@ -17,11 +17,11 @@ cp "$db_file" "$db_file.backup"
 #
 #  Name: Som E. Name
 #  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 {
   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