我有一個包含10個不同文件的目錄,我需要對所有文件運行相同的命令,但將結果保存在獨特的獨立目錄中與我的輸入文件名稱作爲結果目錄名稱。據我所知,我的問題是類似Looping through all the inputs and creating distinct output files,所以我嘗試了下面的代碼:循環訪問目錄中的所有輸入並使用輸入名稱創建輸出目錄
cd /user/test
for i in *.txt
do
fastqc $i -o {$i}.out
done
我得到一個錯誤:
Specified output directory '{1.txt}.out' does not exist
Specified output directory '{2.txt}.out' does not exist
我在想,可能是什麼問題,因爲這將是有益的同時創建管道和工作流程。 謝謝!
@ bioinfo_123:這個答案有什麼問題嗎? – anubhava 2014-12-17 15:43:10