On Sun, 2003-03-23 at 18:15, Magnus Lie Hetland wrote:
> Renat Golubchyk <[EMAIL PROTECTED]>:
> [snip]
> > for file in $( find . -name '*.tga' | sort )
> > do
> > output=$(echo $file | sed s/tga$/png/)
> > convert $file $output
> > done
>
> Why not use bash pattern matching?
>
> for file in $(find . -name \*.tga | sort)
> do
> convert $file ${file%tga}png
> done
>
While you are at it, why not do it in one line =)
-----------------------------------------------------------------------
find . -name '*.tga' -exec bash -c 'x={}; convert $x ${x/%tga/png}' \;
-----------------------------------------------------------------------
Regards,
--
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa
signature.asc
Description: This is a digitally signed message part
