소스 검색

logic error swapped exclusions and patterns

Daniel Sheffield 1 년 전
부모
커밋
91eeea075c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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