2019-11-17 Linux命令行下赋值问题
2019-11-17 本文已影响0人
__一蓑烟雨__
赋值时变量和内容之间的等号(=)两边不能有空格,否则会报错
例如
[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...