Please use ***[code][/code]
*** tags around your code and data, to preserve the original formatting and to improve readability. Do not
use quote tags, bolding, colors, "start/end" lines, or other creative techniques.
is integer only, as is expr
, which is what you're trying to use.
is completely unneeded in modern shells, btw. Everything it can do is available built in. I suggest just forgetting that it exists.
For floating point arithmetic you need to use an external command like bc
How can I calculate with floating point numbers instead of just integers?
You also have two completely unnecessary uses of echo
(the commands for which were unclosed as well),
and $(..) is highly recommended over `..`
render_time=$( echo "$stop_time - $start_time" | bc )
echo "$stop_time - $start_time = $render_time"