Well I am a little concerned with the whole script!!
So where ever I run this, all files and directories will be thrown into 'list'. Is this what you really want? Seems you are only looking for jpg files??
for i in `cat $list | grep productpic |sed -e 's/ //g'| sed -e 's/.*productpic//' | sed -e 's/jpg.*//' | sed 's/[.]/.jpg/g'`
This has to be the most convoluted way I have seen to try and avoid word splitting I have seen for a while.
wget "http://www.digi163.com/battery/productpic$i" > $list
This one is possibly my favourite. See problem one above and then ask yourself what the possible value is that might be stored in '$list'??
Not only that, but you went to all the trouble of avoiding word splitting for your for loop but then didn't quote this variable so here it is again??
Let us go back to some basics:
1. What does the directory structure look like where you are running ls?
2. Provide at least one complete url (can be fake) so we understand what you are wgetting?
3. What do you wish to be the contents of the file and of what file?