Shell脚本if else fi判断语句应用 您所在的位置:网站首页 vue判断语句 Shell脚本if else fi判断语句应用

Shell脚本if else fi判断语句应用

#Shell脚本if else fi判断语句应用| 来源: 网络整理| 查看: 265

记录: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 fi

1.2格式二:if then else fi

if condition then commandA else commandB fi

1.3格式三:if then elif then else fi

if condition1 then commandA elif condition1 then commandB else commandC fi

2.if else的判断语句(())和[]和[[]]

2.1使用(())判断语句

在判断语句(())中,使用>、



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有