diff --git a/fleacollar.sh b/fleacollar.sh index 330e3b7..7f8feb6 100755 --- a/fleacollar.sh +++ b/fleacollar.sh @@ -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