0
我是bash腳本編寫的新手,但我想將某些文件設置爲bash腳本中for循環的變量。我有這樣的代碼:如何在bash中將文件設置爲變量
a=home/my_directory/*.fasta
b=home/my_directory/*.aln
for i in {1..14} # I have 14 files in my_directory with file extension .fasta
do
clustalo -i $a -o $b # clustalo is a command of Clustal Omega software, -i is
# input file, -o is output file
done
我只想在my_directory中使用我所有的fasta文件,並創建另外14個新的aln文件。但有了這個代碼,它不起作用,因爲Clustal程序不能識別這個集合文件。所以,如果你能幫助,我會非常感激。
是否有可能將這些新文件保存到新目錄? – user1997808