summaryrefslogtreecommitdiff
path: root/removeOldBackups.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-10-21 21:59:18 +0200
committerErich Eckner <git@eckner.net>2018-10-21 21:59:18 +0200
commit344b58df35db8e7cd0af1181220c3da9b5f3aa84 (patch)
treeb0dac25d50c6fa0dee07fd46ebc76da303a66e19 /removeOldBackups.in
parent93d2796385a277e20e5eec01e0e0ed0f504e058c (diff)
downloadhardlinkedBackups-344b58df35db8e7cd0af1181220c3da9b5f3aa84.tar.xz
removeOldBackups.in: simplify sed by removing duplicate lines
Diffstat (limited to 'removeOldBackups.in')
-rwxr-xr-xremoveOldBackups.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/removeOldBackups.in b/removeOldBackups.in
index c1602d2..145a6fd 100755
--- a/removeOldBackups.in
+++ b/removeOldBackups.in
@@ -64,7 +64,8 @@ backups=$(
for dist in $(seq 0 20 365); do
printf '/ %s \S\+$/p\n' \
"$(date '+%m %Y' -d@$(($(date +%s)-24*60*60*${dist})))"
- done
+ done | \
+ sort -u
)"
} | \
cut -d' ' -f1 | \