相关疑难解决方法(0)

Bash 运算符 [[ vs [ vs ( vs ((?

我对这些运算符在 bash 中使用时有何不同(括号、双括号、括号和双括号)感到有些困惑。

[[ , [ , ( , ((
Run Code Online (Sandbox Code Playgroud)

我见过人们在这样的 if 语句中使用它们:

if [[condition]]

if [condition]

if ((condition))

if (condition)
Run Code Online (Sandbox Code Playgroud)

shell bash test

436
推荐指数
6
解决办法
19万
查看次数

标签 统计

bash ×1

shell ×1

test ×1