diff options
author | KlzXS <klzx+github@klzx.cf> | 2020-11-08 11:28:28 +0000 |
---|---|---|
committer | KlzXS <klzx+github@klzx.cf> | 2020-11-08 11:28:28 +0000 |
commit | 81953dd57160da91e7f8537086da8e21524b97a6 (patch) | |
tree | 03546e98bbfac19095357615eab42c5f45832e17 | |
parent | d4c1986a95bc6441c7e749f7ea0697add7dc94fa (diff) | |
download | nnn-81953dd57160da91e7f8537086da8e21524b97a6.tar.gz |
Wording
-rwxr-xr-x | plugins/dups | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/dups b/plugins/dups index 5aacbeb..a3b1c5d 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 _ |