From 11ab2070d0ec1ca7f9f0fdb4a23367014654efbb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 31 Jul 2018 08:22:00 +0200 Subject: digest-mailer.in: print summary of all subjects on digest mail --- digest-mailer.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/digest-mailer.in b/digest-mailer.in index 43197d6..8d585f7 100644 --- a/digest-mailer.in +++ b/digest-mailer.in @@ -176,6 +176,20 @@ fi )" printf '\n' counter=1 + printf '%s\n' "${to_send}" | \ + while read -r file; do + sed -n ' + s/^Subject:\s*// + T + p + ' "${file}" + done | \ + sort | \ + uniq -c | \ + sort -k1nr,1 -k2,2 | \ + sed ' + s/^\s*\([0-9]\+\)\s\+/\1: / + ' printf '%s\n' "${to_send}" | \ while read -r file; do date=$( -- cgit v1.2.3-70-g09d2