<p>Hi guys, I have thousands of fasta files each with one sequence only. I need to run a command in my linux/unix system to perform certain job and loop that command through each file and get the output in a single file. Is there a way to do that? I was suggested to use bash loop. For example, if I need to translate a DNA sequence in a fasta file and if the program (sixpack in this case) translates only one sequence at a time, how do I do this for multiple submission of files? I want to avoid doing this individually:</p>

<pre>
<code>sixpack &lt;fasta1.fasta
sixpack &lt;fasta2.fasta
sixpack &lt;fasta3.fasta
</code></pre>

<p>Instead, I want the bash(or perl/python script) to follow the same command looping through each fasta file. Thank you for your help!</p>

<p>for a larger/longer  process that needs to be parallelized, 
use GNU parallel: <a href='http://www.gnu.org/software/parallel/'>http://www.gnu.org/software/parallel/</a></p>

<pre><code>parallel sixpack '&lt;'  {} ::: *.fasta
</code></pre>

<p>or GNU Make with option -j</p>
