summaryrefslogtreecommitdiff
path: root/backupStatistics.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-10-20 14:03:45 +0200
committerErich Eckner <git@eckner.net>2016-10-20 14:03:45 +0200
commit33b42895e53048e9678e5121d39d3aae9bb58709 (patch)
treee617448dbe149279e3e9201babc08f336fd91b51 /backupStatistics.in
parentf071994bbc0c0c9593bd7b8d7e40b244a498a95d (diff)
downloadhardlinkedBackups-33b42895e53048e9678e5121d39d3aae9bb58709.tar.xz
backupStatistics, stage 4 beschleunigt
Diffstat (limited to 'backupStatistics.in')
-rw-r--r--backupStatistics.in12
1 files changed, 8 insertions, 4 deletions
diff --git a/backupStatistics.in b/backupStatistics.in
index 4ba66d2..db5a241 100644
--- a/backupStatistics.in
+++ b/backupStatistics.in
@@ -68,16 +68,20 @@ do_stage()
echo 'find duplicate hashes'
return 0
fi
- uniq -m1 -D "${cacheDir}/${backupID}.content" |
+ (
+ uniq -m1 --all-repeated=separate "${cacheDir}/${backupID}.content"
+ echo ""
+ ) | \
+ sed 's|^\S\+ ||' | \
sed '
:a;
$!N;
- s@^\(\S\+ \)\(.*\)\n\1@\1\2 @;
+ s|\n\(.\)| \1|;
ta;
+ s|^ ||;
P;
D
- ' | \
- sed 's|^\S\+ ||' > \
+ ' > \
"${cacheDir}/${backupID}.duplicates"
;;
5)