On 2006-12-25, Neil Bothwick <[EMAIL PROTECTED]> wrote:
> --Sig_QmXi9jAOe7nHzs/ZHwPB5to
> Content-Type: text/plain; charset=US-ASCII
> Content-Transfer-Encoding: quoted-printable
>
> 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:
>>=20
>> 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}     # cauti=
> on: overwrites original file
> done

You guys are making things too complicated.  As someboyd else
suggested, use mogrify. Or just tell convert to write to the
same filename, and it'll do the right thing:

for i in *.jpeg; do
  convert resize WxH ${i} ${i}
done  

-- 
Grant Edwards                   grante             Yow!  Mr and Mrs PED, can I
                                  at               borrow 26.7% of the RAYON
                               visi.com            TEXTILE production of the
                                                   INDONESIAN archipelago?

-- 
gentoo-user@gentoo.org mailing list

Reply via email to