On Sun, Dec 13, 2009 at 4:36 PM, david <da...@kenpro.com.au> wrote:
> this is something I do all the time and it works perfectly, but I'm sure
> there is a more elegant way to do it:
>
>
> $ for i in *.tif ; convert $i $i.jpg; done
> $ for i in $i.jpg ; do mv $i `echo $i | sed s/.tif//`; done
>
> Apart from specific examples, where do I look in the bash book for a better
> way to remove the <.tif> part of the output filename, or other such
> substitutions?

This is one way:

$ for i in *.tif; do convert $i `basename $i .tif`.jpg; done

- Gonzalo
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to