只有两个结果     成功返回0     失败返回非0

linux 条件判断 test

或者直接用                  

[ ] 中括号判断

linux 条件判断 test

linux 条件判断 test

例如   [ -d /usr/local/software] ;  echo $?

多条件

linux 条件判断 test

&&前面语句执行成功后执行     ||   前面语句执行失败后执行

linux 条件判断 test

 

相关文章: