0
如何在linux中使用for循環來生成以下幾行?for循環回顯順序命令行?
zcat ~/tools/sample66621D.fastq | bowtie2 -a - | samtools ->sample66621D.BAM
zcat ~/tools/sample66622D.fastq | bowtie2 -a - | samtools ->sample66622D.BAM
zcat ~/tools/sample66623D.fastq | bowtie2 -a - | samtools ->sample66623D.BAM
我已經試過:
for ((a=21;a<=23;a++))
echo "zcat ~/tools/sample666$aD.fastq | bowtie2 -a - | samtools ->sample666$aD.BAM"
done
卻原來是三個相同的線。
zcat ~/tools/sample666.fastq | bowtie2 -a - | samtools ->sample666.BAM
zcat ~/tools/sample666.fastq | bowtie2 -a - | samtools ->sample666.BAM
zcat ~/tools/sample666.fastq | bowtie2 -a - | samtools ->sample666.BAM
感謝
謝謝,它的工作原理。把這些echo命令行輸出到run.sh文件怎麼樣? - >在這裏沒有工作。 – Ming