On Sun, 24 Dec 2006 13:25:39 +0100, Etaoin Shrdlu wrote:

> if you don't want to keep the original images, then it's simpler:
> 
> for i in *.jpeg; do
>   convert -resize WxH ${i} ${i}.resized
>   mv ${i}.resized ${i}     # caution: overwrites original file
> done

If the convert command fails, the original file will still be overwritten
with a possibly empty output file. A safer option is:

for i in *.jpeg; do
  convert -resize WxH ${i} ${i}.resized && mv ${i}.resized ${i}     # caution: 
overwrites original file
done


-- 
Neil Bothwick

It is impossible to fully enjoy procrastination
unless one has plenty of work to do.

Attachment: signature.asc
Description: PGP signature

Reply via email to