When I run Apple\'s Automator to simply cut a bunch of images in their size Automator will also reduce the quality of the files (jpg) and they get blurry.
To avoid "space" problem, it's smarter to change IFS than renaming.
Back up current IFS and change it to \n only. And restore original IFS after the processing loop.
ORG_IFS=$IFS
IFS=$'\n'
for file in $@
do
...
done
IFS=$ORG_IFS