From: martin f. krafft Date: Wed, 4 Jan 2012 15:27:59 +0000 (+0100) Subject: count attachments case-insensitively X-Git-Url: https://git.madduck.net/etc/mutt.git/commitdiff_plain/1091034dc914e17c7ca8280f898204303046c9bf?ds=sidebyside count attachments case-insensitively --- diff --git a/.mutt/sendmail-checks.d/check-attachments b/.mutt/sendmail-checks.d/check-attachments index 5632f2e..8f01f85 100755 --- a/.mutt/sendmail-checks.d/check-attachments +++ b/.mutt/sendmail-checks.d/check-attachments @@ -23,8 +23,8 @@ OVERRIDE_HEADER=X-No-Attach if ! grep -qi "^${OVERRIDE_HEADER}:" "$1" \ && grep -v '^> ' "$1" | egrep -ziq "($RE_ENGLISH|$RE_GERMAN|$RE_FRENCH)"; then - nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//p' "$1" | - egrep -cv '^(multipart/|application/pgp-signature)') + nr_attach=$(sed -rne 's/^Content-Type:[[:space:]]+//pi' "$1" | + egrep -civ '^(multipart/|application/pgp-signature)') if [ $nr_attach -lt 2 ]; then echo >&2 "E: the mail message likely references an attachment,"