码迷,mamicode.com
首页 > 系统相关 > 详细

shell misc

时间:2021-03-30 13:52:37      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:lse   ==   表达   base   The   span   rgba   sed   echo   

. shell逻辑表达式

#!/bin/bash

FILE_BASED_ENCRYPTION="true"

if [ "$FILE_BASED_ENCRYPTION" == "true" ]
then
echo "if: first one" || echo "if: second one"
else
echo "else case"
fi

echo "if: first one"执行的返回值是0(为真),所以||后面的echo "if: second one"不会执行了

 

shell misc

标签:lse   ==   表达   base   The   span   rgba   sed   echo   

原文地址:https://www.cnblogs.com/aspirs/p/14593672.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!