I am new to bash and would like to get help how to run for loop.
Here is my question, I have 10 different sorted bam files(*.sorted.bam) and I would like to do indexing for each sorted bam files.
I know how to run it for single file using the command below
samtools index sample.sorted.bam
I would be happy if some one could show me how to run for multiple files
Best, Amare