[ale] How to use xargs correctly to create thumbnails
Gary Maltzen
maltzen at mm.com
Mon Oct 30 13:25:43 EST 2000
Create a "/path/to/doit1" script
#!/bin/bash
/path/to/convert -geometry 25\% $1 $1-mini
Then use the "-exec" option of find...
find /tmp/test -name \*\.jpg -exec /path/to/doit1 \{\} \;
Then go back through and rename *.jpg-mini to *-mini.jpg
with a "/path/to/doit2" script
#!/bin/bash
mv $1 `echo $1 | sed -e 's/.jpg-mini/-mini.jpg/'`
----- Original Message -----
From: m <silberm at mindspring.com>
To: ale at ale.org
> I am trying the move through a directory structure and use ImageMagick's
> convert to create thumbnails. Convert is easy enough to work it requires
>
> #convert -geometry 25% product.jpg product-mini.jpg
>
> However I am not sure how to trangress a direcory structure. I have
> treid something like;
>
> #find /tmp/test -name \product.jpg -print "%h/%f %h/mini-%f\0" | xargs
> -0 -l1 convert -geometry 25%
>
> But can't get it to work. Any suggestions?
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list