B
B
bad_student2014-11-17 13:47:15
Command line
bad_student, 2014-11-17 13:47:15

How to perform arithmetic operations on real numbers in Shell?

How to perform arithmetic operations on real numbers in Shell?
If you use expr - it gives an error "non-integer argument"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fghd, 2014-11-17
@bad_student

Use bc / awk to calculate floating point values ​​and store the result in a variable, or create a simple C program that will be in the directory with the script and give you the desired result.
stackoverflow.com/questions/12722095/how-can-i-get... for example, you can see here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question