Hi misc@,

while calculating my phys. memory (mb) with the 
folllowing shellsript i get as a result -424.

sysctl -n hw.physmem returns 3849830400

------------
#!/bin/sh

phys_mem_bytes=`sysctl -n hw.physmem`
phys_mem_mb=`expr $phys_mem_bytes / 1024 / 1024`
echo $phys_mem_mb
----------

so i tried
expr 2147483647 / 2 which returns 1073741824 while
expr 2147483648 / 2 returns -1073741824


ksh(1) states that expr does Integer arithmetic.
So is this the expected behaviour or a bug?


Regards,
Fabian Raetz

Reply via email to