mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Wording
This commit is contained in:
parent
d4c1986a95
commit
81953dd571
|
@ -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 _
|
||||
|
|
Loading…
Reference in a new issue