Answer the question
In order to leave comments, you need to log in
How to add number to output file by iteration?
Hello, I have three files in the B4627 directory:
1_S_R1_001.fastq.gz
2_S_R1_001.fastq.gz
3_S_R1_001.fastq.gz
exit_1.sam, exit_2.sam, exit_3.sam
#!/bin/bash
for FILE in *R1_001.fastq.gz;
do
BASENAME=${file%%_R1_001.fastq.gz*}
echo "bowtie2 -x covexp -U B4627/$FILE -S exit.sam" ;
done
ls -l | awk '{print $9}' | sed 's/_S.*$//'
exit.sam
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question