I want to do a loop for all the images in a directory. The images doesn't have extension so I have to read the first bytes of the image to know its type. The loop should end up being something like.
for file in *
do
if [ file --mime-type -b ]
then
***
fi
done