diff options
author | Erich Eckner <git@eckner.net> | 2018-04-09 13:16:44 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-09 13:16:44 +0200 |
commit | 85f7bfebb387d4aeea8538aabcca25426d22bf66 (patch) | |
tree | 40eb6e54f2f2d68c375dd7a925ee2a5820c2d621 | |
parent | 316e9516d4022d80956a898c3cc0e3c8453a48f5 (diff) | |
download | digest-mailer-85f7bfebb387d4aeea8538aabcca25426d22bf66.tar.xz |
digest-mailer.in: fix sed, make digest nicerv0.0
-rw-r--r-- | digest-mailer.in | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/digest-mailer.in b/digest-mailer.in index b62b57c..764f5eb 100644 --- a/digest-mailer.in +++ b/digest-mailer.in @@ -169,15 +169,19 @@ fi sed -n ' /^$/q s/^Subject:.*$/Subject: mail-digest/ + p ' "$( - printf '%s' "${to_send}" | \ + printf '%s\n' "${to_send}" | \ head -n1 )" printf '\n' + counter=1 printf '%s\n' "${to_send}" | \ while read -r file; do + printf 'vvvvv %s. vvvvv\n' "${counter}" cat "${file}" - printf '\n' + printf '\n^^^^^ %s. ^^^^^\n' "${counter}" + counter=$((counter+1)) rm "${file}" done } | ${mail_cmd} |