That gives 2047. Although the problem seemed to be with multiplication, not division.
While reading the expr man page, I noticed the -e option, to detect overflows. I added it to the script, and no longer get errors:
RAM information
System memory summary
Total real memory available...
I also get an error in the memory section:
expr: illegal option -- 1
usage: expr [-e] expression
expr: syntax error
I threw a few extra lines into 020.mem to see the values of the memory variables:
physmem: 3744890880
activemem: 140959744
inactmem: -1125810176
cachemem: 142274560
allmem...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.