Bash脚本if语句
发布时间:2020-12-15 18:49:44 所属栏目:安全 来源:网络整理
导读:在 Bash脚本中,以下片段有什么区别? 1)使用单括号: if [ "$1" = VALUE ] ; then # codefi 2)使用双括号: if [[ "$1" = VALUE ]] ; then # codefi The [[ ]] construct is the more versatile Bash version of [ ]. This is the extended test command,ado
在
Bash脚本中,以下片段有什么区别?
1)使用单括号: if [ "$1" = VALUE ] ; then # code fi 2)使用双括号: if [[ "$1" = VALUE ]] ; then # code fi
More info on the Advanced Bash Scripting Guide. 在您的代码段中,没有任何区别,因为您没有使用任何其他功能. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |