for i in *.JPG; do convert $i -resize 50% $(basename $i .JPG)-klein.jpg; done