In this case, I wanted to list files that passed a certain criteria and loop over them so that I could call a Perl script on them.
for i in `find . -type f -name '*.pm' -print`; \In the above case, I am searching for all files that end in pm, starting from the current directory (.) and once found, I am executing the perl script some_script.pl on them.
do perl some_script.pl $i; \
Of course, you don't have run a perl script ... you could just echo the output:
for i in `find . -type f -name '*.pm' -print`; \Now, next time I need to run a similar command, I wont forget how to construct the query!
do echo found $i; \