我试图实施以下法典,该法典载于Bash文。
NUMBER=600
LOSS_RATE=0,3
TOT_PKT=100
test=$(python -c "from math import ceil; print ceil($NUMBER * 500.0)")
test2=$(python -c "from math import ceil; print ceil($NUMBER * $LOSS_RATE)")
echo $test
echo $test2
我收到以下文件:
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: ceil() takes exactly one argument (2 given)
300000.0
The first Python-command is executed, but the second causes the given TypeError. How do I do to resolve this?