Fixed an error in the add_address script.

This commit is contained in:
Storm Dragon 2019-04-20 17:05:40 -04:00
parent 86500f6813
commit ef7862a5d9

View File

@ -95,7 +95,7 @@ initialize_directory()
message="\$(cat)"
newAlias=\$(echo "\${message}" | grep "^From: " | sed 's/[\,\"\']//g' | awk '{\$1=""; if (NF == 3) {print "alias" \$0;} else if (NF == 2) {print "alias" \$0 \$0;} else if (NF > 3) {print "alias", tolower(\$2)"-"tolower(\$(NF-1)) \$0;}}')
newAlias=\$(echo "\${message}" | grep "^From: " | sed "s/[\,\"\']//g" | awk '{\$1=""; if (NF == 3) {print "alias" \$0;} else if (NF == 2) {print "alias" \$0 \$0;} else if (NF > 3) {print "alias", tolower(\$2)"-"tolower(\$(NF-1)) \$0;}}')
emailAddress="<\${newAlias##*<}"
if ! grep -Fq "\$emailAddress" "$muttHome/aliases" ; then