Answers for "bash float division"

1

bash float division

bc -l <<< '10/3' # Fast way
3.33333333333333333333
bc <<< 'scale=2; 10/3' #Define also how many decimals to take in scale
3.33
Posted by: Guest on November-27-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language