From 81953dd57160da91e7f8537086da8e21524b97a6 Mon Sep 17 00:00:00 2001 From: KlzXS Date: Sun, 8 Nov 2020 11:28:28 +0000 Subject: [PATCH] Wording --- plugins/dups | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/dups b/plugins/dups index 5aacbeb9..a3b1c5d6 100755 --- a/plugins/dups +++ b/plugins/dups @@ -24,7 +24,7 @@ printf "\ ## This is an overview of all duplicate files found. ## After editiing this file you will be prompted to remove some of them. ## You can choose between removing all the commented out files, all the uncommented ones or none at all. -## All the lines begining with '##','#md5sum' or 'md5sum' will be ignored either way. +## Lines with double comments (##) are always ignored. ## If you choose to remove, you will be given a choice between removing with force or interactively for each file.\n " > "$tmpfile" @@ -33,7 +33,7 @@ find . -size +0 -type f -printf "%${size_digits}s %p\n" | sort -rn | uniq -w"${s s/^ {,12}([0-9]{,12}) (.*)$/printf "%s %s\\n" "$(md5sum "\2")" "d\1"/ ' | tr '\n' '\0' | xargs -0 -n1 sh -c | sort | { uniq -w32 --all-repeated=separate; echo; } | sed -nE ' h -s/^(.{32}).* d([0-9]*)$/#md5sum: \1 size: \2 bytes/p +s/^(.{32}).* d([0-9]*)$/## md5sum: \1 size: \2 bytes/p g :loop @@ -47,9 +47,9 @@ printf "Remove commented files? (yes/no/abort) [default=a]: " read -r commented if [ "$commented" = "y" ]; then - sedcmd="/^(##|#?md5sum|[^#]).*/d; /^$/d; s/^# *(.*)$/\1/" + sedcmd="/^(##|[^#]).*/d; /^$/d; s/^# *(.*)$/\1/" elif [ "$commented" = "n" ]; then - sedcmd="/^(#|#?md5sum).*/d; /^$/d; s/^ *(.*)$/\1/" + sedcmd="/^#.*/d; /^$/d; s/^ *(.*)$/\1/" else printf "Press any key to exit" read -r _