diff options
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) |