shell 遇到的问题

1、 -bash: [: too many arguments

[root@ceph-104 home]# if [ $count eq 0 ]; then echo 'Not found ' ${PROCESS} 'process!'; exit 0; fi
-bash: [: too many arguments

原因是shell 变量匹配
需要将$count 修改成 "$count "

上一篇:24.重构


下一篇:解决Intellij IDEA运行报Command line is too long的问题