Skip to content

四、运算符

1、基本语法

“$((运算式))” 或 “$[运算式]”

2、案例实操

计算(2+3)* 4 的值

sh
[root@k8s-node shells]# S=$[(2+3)*4]
[root@k8s-node shells]# echo $S