'basename' is the utility purpose built for this:

     convert $i `basename $i .tif`.jpg

sure, slower than that bash fancy-ass stuff,
but hey it works on all shells, even crazy
shells like csh.

Matt



On Tue, 28 Oct 2003 20:33:45 +1100 (AUS Eastern Daylight Time)
Norman Widders <[EMAIL PROTECTED]> wrote:

> On Tue, 28 Oct 2003, Broun, Bevan wrote:
> 
> you might save a step thus avoiding invoking sed
> 
> for i in *.tif; do
>       convert $i ${i%tif}jpg
> done
> 
> 
> > see the convert utility from the ImageMagick set of programs.
> > if its installed you could probably just do
> >
> >     for f in *.tif;do
> >     g=`echo $f | sed -e 's/.tif$/.jpg/'`
> >     convert  $f $g
> >     done
> > BB
> 
> kind regards
> Norm
> 
> -- 
> Epsilon-6!                         Ph:+612 8807-4780   Fax: +612 8807-4498
> E-Solutions for BSD and Linux               http://www.paladincorp.com.au/
> This e-mail and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed.
> 
> -- 
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug
> 


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to