赋值时变量和内容之间的等号(=)两边不能有空格,否则会报错
例如
[c@localhost reads]$ total=`cat tmp.vcf|grep -v '^#'|grep -v 'INDEL' | wc -l`
[c@localhost reads]$ echo $total
36
[c@localhost reads]$ t_total = ` cat tmp.vcf|grep -v '^#'|grep -v 'INDEL' | wc -l `
bash: t_total: command not found...
网友评论