# Hello World Program in Bash Shell
touch a.jpg;
touch b.jpg;
touch c.png;
ls;
declare -a arr=("jpg" "png" "svg")
## now loop through the above array
for i in "${arr[@]}"
do
echo "$i"
## Create a directory based on file extension
destination="$i"
mkdir $destination
find . -name "*.$i" -exec mv {} $destination/ \;
done
printf "\n\n\n\n";
echo "###### Results ########"
echo "Root directory"
ls;
echo "Inside JPG folder"
ls jpg/
echo "Inside PNG folder"
ls png/
rm -rf *;