I have a command I want to run on all of the files of a folder, and the command\'s syntax looks like this:
tophat -o
Not an answer but a suggestion: as a bioinformatician, you shoud use GNU make and its option -j (number of parallel jobs). The Makefile would be:
-j (number of parallel jobs)
.PHONY:all FASTQS=$(shell ls *.fastq) %.bam: %.fastq tophat -o $@ $< all: $(FASTQS:.bam=.fastq)