From aa09d1597efad2bb2c6bd1ad7b4e1ec12dc94bcf Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 28 Jun 2023 12:00:37 +0200 Subject: [PATCH] Removed bug --- list_duplicates.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/list_duplicates.sh b/list_duplicates.sh index 11f8fe3..94161ef 100755 --- a/list_duplicates.sh +++ b/list_duplicates.sh @@ -9,6 +9,12 @@ fi dir="$1" duplicates=$(find "$dir" -type f -exec md5sum {} + | sort | uniq -d -w32) +if [ -z "$duplicates" ] +then + echo "No duplicates found." + exit 0 +fi + echo "Duplicates found:" echo "$duplicates" | while read line