I have a folder with 18 pairs of files with the same name except one has an R1 and the other an R2 , e.g. SM000907_S1_R1.fastq
and SM000907_S1_R2.fastq
.
I would like to throw a command in a loop for all these pairs.
I've tried the following loop, but it's not working (it throws the error "wrong substitution"):
for sample in ${seq 1 18}; do
merge-paired-reads.sh SM000907_S$sample_R1.fastq SM000907_S$sample_R2.fastq > output
done