我想要stderr一個 for 回圈中的所有檔案。到目前為止,只有 for 回圈中的第一個被寫入summary.txt.
我的代碼:
SAMPLES="SRR1 SRR2 SRR3 SRR4"
for SAMPLE in $SAMPLES; do hisat2 -p 24 -x /home/genome_g7b -1 /home/${SAMPLE}_1_val_1.fq -2 /home/${SAMPLE}_1_val_2.fq -S ${SAMPLE}.sam | 2>summary.txt
done
uj5u.com熱心網友回復:
您為回圈內的所有命令重定向檔案描述符。
for anything in anything; do
anything
done 2>summary.txt
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/439178.html
上一篇:for回圈的Python性能
