]> Sergey Matveev's repositories - nnn.git/commitdiff
Wording
authorKlzXS <klzx+github@klzx.cf>
Sun, 8 Nov 2020 11:28:28 +0000 (11:28 +0000)
committerKlzXS <klzx+github@klzx.cf>
Sun, 8 Nov 2020 11:28:28 +0000 (11:28 +0000)
plugins/dups

index 5aacbeb98797b5c1b6fb6330238890167647f1f8..a3b1c5d639c96582f6092f363ff52862bba50bf6 100755 (executable)
@@ -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 _