Shell脚本if else fi判断语句应用 | 您所在的位置:网站首页 › vue判断语句 › Shell脚本if else fi判断语句应用 |
记录:431 场景:Shell脚本if else判断语句应用。一般格式:if then fi、if then else fi、if then elif then else fi、if then elif then elif then else fi。 版本:CentOS Linux release 7.9.2009。 1.if else常用格式 1.1格式一:if then fi if condition then command1 ... commandN fi1.2格式二:if then else fi if condition then commandA else commandB fi1.3格式三:if then elif then else fi if condition1 then commandA elif condition1 then commandB else commandC fi2.if else的判断语句(())和[]和[[]] 2.1使用(())判断语句 在判断语句(())中,使用>、 |
CopyRight 2018-2019 实验室设备网 版权所有 |