#!/bin/bash
l=$(ls)
mkdir shrink
for s in $l
do
if [[ $(file -b $s) =~ PNG ]]
then
convert -resize 20% $s "./shrink/$s"
echo $t
elif [[ $(file -b $s) =~ JPEG ]]
then
convert -resize 20% $s "./shrink/$s"
echo $t
fi
done