由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
If & whle & case
if [ 1 -eq 1 ] #expressionthen#Statement(s) to be executed if expression is trueecho Yesfi
字符串判断
##https://blog.csdn.net/Primeprime/article/details/79625306strA="long string"strB="string"result=$(echo $strA | grep "${strB}")if [[ "$result" != "" ]]thenecho "包含"elseecho "不包含"fi
while
while [ expression ]doStatement(s) to be executed if expression is truedone
try
reference:筱光
{ # trycommand1#save your output} || { # except# save log for exception}
Enjoy~
由於語法渲染問題而影響閱讀體驗, 請移步博客閱讀~
本文GitPage地址
GitHub: Karobben
Blog:Karobben
BiliBili:史上最不正經的生物狗
