scripts/utilities/sort.sh

17 lines
230 B
Bash
Raw Normal View History

2023-02-07 00:01:21 +03:00
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"