From 676a7527fb2455f1eac9220e7bae7b7f3c68189c Mon Sep 17 00:00:00 2001 From: leca Date: Tue, 7 Feb 2023 00:10:20 +0300 Subject: [PATCH] fixed random collisions --- utilities/shuffle.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utilities/shuffle.sh b/utilities/shuffle.sh index 5da1fc3..ccff049 100755 --- a/utilities/shuffle.sh +++ b/utilities/shuffle.sh @@ -9,6 +9,9 @@ mkdir shuffled; for file in $to_shuffle; do rand=$RANDOM + while test -f "shuffled/$rand.${extension}"; do + rand=$RANDOM + done mv ${file} shuffled/$rand.${extension} done