extension=""
echo "Type an extension to sort"
read extension
to_sort=$(find . -name "*.${extension}");
mkdir sorted;
counter=1
for file in $to_sort; do
mv ${file} sorted/$counter.${extension}
((counter++))
done
echo "Done"