From 7b14d3ab1b017e45c5c4c2797dcfd6353a15d4ee Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 18 Jun 2018 08:34:56 +0200 Subject: digest-mailer.in: print date/time of parts of digest --- digest-mailer.in | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/digest-mailer.in b/digest-mailer.in index 62d7dca..43197d6 100644 --- a/digest-mailer.in +++ b/digest-mailer.in @@ -178,9 +178,20 @@ fi counter=1 printf '%s\n' "${to_send}" | \ while read -r file; do - printf 'vvvvv %s. vvvvv\n' "${counter}" + date=$( + printf '%s\n' "${file##*/}" | \ + cut -d. -f3 + ) + date=$( + date -d"@${date}" + ) + printf 'vvvvv %s. (%s) vvvvv\n' \ + "${counter}" \ + "${date}" cat "${file}" - printf '\n^^^^^ %s. ^^^^^\n' "${counter}" + printf '\n^^^^^ %s. (%s) ^^^^^\n' \ + "${counter}" \ + "${date}" counter=$((counter+1)) rm "${file}" done -- cgit v1.2.3-70-g09d2