Answers for "bash math expression"

1

bash math expression

# 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
Posted by: Guest on June-26-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language