Dear All,<br><br>I'm writing a shell script for the blender, but I've some trouble whit it.<br>The important script part is this:<br><br><span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">for i in ${SEQUENCE}</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">
<span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">do</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);"><span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    echo Next frame to render: ${i}</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">
<span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    COMMAND="./blender -b ${INPUT_FILE} -o /home/viktor_64/Desktop/ldd/ -F PNG -x 0 -f ${i}"</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">
<span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    j=`(printf "%d" "${i}")`</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);"><span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    FILE_LIST="${FILE_LIST} ${i}"</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">
<span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    echo Blender command:${COMMAND}</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);"><span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    ${COMMAND}  </span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">
<span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">    mv ${i} ${j}</span><br style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);"><span style="font-family: comic sans ms,sans-serif; color: rgb(51, 51, 255);">done</span><br>
<br>After running this the output is named to 0001 and the program terminate because, the mv command cannot rename the file, and it is terminated.<br>I don't know why is the output 0001. How can I fix this?<br>I've try to modify the mv to     <br>
<span style="font-family: courier new,monospace; color: rgb(51, 102, 255);">mv "*.PNG" ${j}</span><br>but it also didn't work. I think the command above is wrong cuz it try to rename multiply file to the same name and this is not possible, but I'm out of ideas.<br>
Any other suggestion??<br style="color: rgb(51, 102, 255);">