-----BEGIN PGP SIGNED MESSAGE----- On Wed, Aug 01, 2001 at 11:00:07PM -0700, Miaoling Chiu wrote:
$ for i in *.gif do convert -sample 50% $i ${i%.gif}.png done ... careful. That assumes that the source image is completely read and closed before the output file is produced. Look up "Parameter Expansion" in bash's man page: the ${i%.gif} will chop ".gif" off the value of i. Grok this: echo "<html><body><p>Thumbs</p> > thumbs.html for image in *jpg do thumbName=${image%.jpg}-thm.jpg djpeg < $image | pnmscale -width 80 | cjpeg > $thumbName echo "<a href=\"$image\"><image border=0 src=\"$thumbName\"></a>" done >> thumbs.html echo "</body></html>" >> thumbs.html > (ren *.doc *.txt). I have still not succeeded. for n in *.doc;do mv $n ${n%.doc}.txt;done James. -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv iQBVAwUBO2jyICX8mcqArqQRAQHv8wH/SDIE8N3ARR4fktcIwxwaUamr375iUd1B WX3qhim6nXXBS30OpxK7SQTs0S/sqotB/faHWDSV7j5sxyH9cHqzIA== =/p9l -----END PGP SIGNATURE-----