运维网's Archiver
论坛
›
Shell/Powershell
› shell变量的使用
a616652325
发表于 2018-8-24 07:18:32
shell变量的使用
1、两个数相加
变量1=`expr $变量2 + $变量3`
变量1=`expr $变量2 + 常数`
2、两个数相减
变量1=`expr $变量2 - $变量3`
变量1=`expr $变量2 - 常数
3、两个数相乘
变量1=`expr $变量2 \* $变量3`
变量1=`expr $变量2 \* 常数`
4、两个数相除
变量1=`expr $变量2 / $变量3`
变量1=`expr $变量2 / 常数`
页:
[1]
查看完整版本:
shell变量的使用