【发布时间】:2018-04-19 05:35:02
【问题描述】:
我正在尝试使用浮点值传递这个组合变量:
j=1
DA1=178.2929838483883283
if (( $(bc <<< "$((DA$j)) > 150") )) && (( $(bc <<< "$((DA$j)) < -150") ))
then
D="T"
fi
但我明白了:
178.2929838483883283: syntax error: invalid arithmetic operator (error token is ".2929838483883283")
【问题讨论】:
-
请看BashFAQ/006。
标签: bash variables if-statement