I'm not sure I understand exactly what you're asking, but if you want to run a command for every item in a glob, you can use the following format (a trick I probably use 10 times a day)
Code:
for FILE in *.jpg; do echo ${FILE}; done
You can put any number of commands between "do" and "done". Just terminate each with a semicolon.
It's also often useful to use a command substition in the above format.
Code:
for FILE in `cat new.txt`; do echo ${FILE]; done
Or, if your files are scattered about, you can have the find command run commands on files.
Code:
find . -iname *.jpg -exec echo \{\} \;
Note that \{\} gets replaced with the filename, and the \; is manditory
(This particular example would do the exact same thing that that find normally does, though)