📜  bash 数学表达式 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:51.584000             🧑  作者: Mango

代码示例1
# Basic syntax:
$((your_expression))

# Example usage:
echo $(((5 * 4)/3))
--> 6 
# Note, if you only use integers in your expression, the answer will be
#    rounded down to the nearest integer
echo $(((5 * 4.0)/3))                                                                                                                                                                                                                                             100%  
--> 6.666666666666667