当我输入以下命令时:
result=$(( ($1-32)*(5/9) )) echo $result
变量 result 始终计算为整数,无论方程是否计算为十进制数。为什么是这样?
command-line bash
bash ×1
command-line ×1