我对这些运算符在 bash 中使用时有何不同(括号、双括号、括号和双括号)感到有些困惑。
[[ , [ , ( , ((
我见过人们在这样的 if 语句中使用它们:
if [[condition]] if [condition] if ((condition)) if (condition)
shell bash test
bash ×1
shell ×1
test ×1