. 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"不会执行了
2024-02-03 08:41:16
. 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"不会执行了