added shuffle.sh

This commit is contained in:
leca 2023-02-07 00:07:05 +03:00
parent f1dbbd6029
commit 6c4ce4b4c9
1 changed files with 16 additions and 0 deletions

16
utilities/shuffle.sh Executable file
View File

@ -0,0 +1,16 @@
extension=""
echo "Type an extension to shuffle"
read extension
to_shuffle=$(find . -name "*.${extension}");
mkdir shuffled;
for file in $to_shuffle; do
rand=$RANDOM
mv ${file} shuffled/$rand.${extension}
done
echo "Done"