I would like to do some simple math for some code.
ex.
variableA=variableB*variableC
what could be the code for this?
I would like to do some simple math for some code.
ex.
variableA=variableB*variableC
what could be the code for this?
variableA=$((variableB*variableC))
and what about
variableA=variableA "Divided by" 1000 * 1024
variableA=$(($variableA/1000*1024))
Mind to use braces when needed, I wasn't sure whether you meant /1000*1024 or /(1000*1024).
thanks
I still needed to do a little testing, but I guess it's better to do the multiplying first and then divide
ok then. This is perfect for now though
Wow, 4 years later, just the answer I was looking for. Thanks!
Necrobumping.
Thread Closed.
New one here: http://ubuntuforums.org/showthread.php?t=1852886
Bookmarks