for loops feeding a batch file?

I want to calculate alpha diversity for a list of taxa. I can make a file that has the desired taxa, feed that into a for loop something like this:

for t in taxa.file; do mothur #get.lineage(shared=final.shared, constaxonomy=final.cons.taxonomy, taxon=$t); summary.single(shared=current, size=1000, n=100); done

But, that would overwrite the new shared and alpha div files each time. Right? Is there another way to do this?

You could use mothur’s system command, http://www.mothur.org/wiki/System, to rename the files so you don’t overwrite things.

ah, right. thanks