diff options
author | Erich Eckner <git@eckner.net> | 2016-10-20 14:03:45 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2016-10-20 14:03:45 +0200 |
commit | 33b42895e53048e9678e5121d39d3aae9bb58709 (patch) | |
tree | e617448dbe149279e3e9201babc08f336fd91b51 /backupStatistics.in | |
parent | f071994bbc0c0c9593bd7b8d7e40b244a498a95d (diff) | |
download | hardlinkedBackups-33b42895e53048e9678e5121d39d3aae9bb58709.tar.xz |
backupStatistics, stage 4 beschleunigt
Diffstat (limited to 'backupStatistics.in')
-rw-r--r-- | backupStatistics.in | 12 |
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) |