for file in *.jpg; do
convert -resize 800x600 -- "$file" "${file%%.jpg}-resized.jpg";
done
OR
ls *.jpg|sed -e 's/\..*//'|xargs -I X convert X.jpg whatever-options X-resized.jpg
# .jpg files, 10% size, no rename, it will overwrite the old pictures #!/bin/bash for i in *.
; do convert $i -resize 10% $(basename $i .
jpg
).
jpg
; done
jpg