如果我想执行包含变量的命令,我必须先将字符串存储在变量中,然后才能执行.
示例:
path_fasta="/home/xxx/yyy/zzz/qqq/"
name_fasta="CTA_Mix_DNA.fna"
path_outp"/some/Path/"
temp='find . -maxdepth 1 -not -name '$name_fasta' -not -name letsgo.sh -delete'
$temp
temp=$path_mothur'mothur #set.dir(output='$path_outp');summary.seqs(fasta='$path_fasta''$name_fasta')'
$temp如何在不首先将其存储在临时中的情况下直接实现?一定很容易,但没有找到解决办法.
发布于 2013-03-19 18:08:25
而不是:
temp='find . -maxdepth 1 -not -name '$name_fasta' -not -name letsgo.sh -delete'
$temp...just使用:
find . -maxdepth 1 -not -name "$name_fasta" -not -name letsgo.sh -deletehttps://stackoverflow.com/questions/15507168
复制相似问题