summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-06-18 08:34:56 +0200
committerErich Eckner <git@eckner.net>2018-06-18 08:34:56 +0200
commit7b14d3ab1b017e45c5c4c2797dcfd6353a15d4ee (patch)
treed144b0f4cb2513b4eb88c16cecf8799c6c313e11
parentac37e04706c10e5a8aad0b5b3f1f2c10d50c5a0d (diff)
downloaddigest-mailer-7b14d3ab1b017e45c5c4c2797dcfd6353a15d4ee.tar.xz
digest-mailer.in: print date/time of parts of digest
-rw-r--r--digest-mailer.in15
1 files 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