i wanted to convert the format of all image files in a folder using the following shell script. My idea is to use the base name of the filename and using the same for naming the file to be converted. I gathered these lines from internet and could not meet my requirement. Thank u all.
for f in *.eps
do
echo "converting format....."
filename=`basename ${f}`
fbase=`$filename | cut -d'.' -f1`
extn = ${fbase}.png
convert -geometry 1000x1000 -density 300 -trim ${f} $extn
done