Hello,
I am currently writing a script to print a report after collecting a bunch of information on our servers. The report is looking fine except for 1 thing. There are about 3 spots on the report that the number comes out negative. I tried running the command on the command line and I still get a negative anwer. This is the command in both the script and via command line that I am using:
expr 900000 \* 2575
the answer I am getting is this:
-1977467296
instead of: 2317500000
Can you help as to why I am getting this? How can I get it to be positive and the correct answer?
Thanks so much for helping me with this trivial question. I am sure I am missing something obvious.
Geek
P.s. This is on a Linux box. (not sure if that makes a difference)
I am currently writing a script to print a report after collecting a bunch of information on our servers. The report is looking fine except for 1 thing. There are about 3 spots on the report that the number comes out negative. I tried running the command on the command line and I still get a negative anwer. This is the command in both the script and via command line that I am using:
expr 900000 \* 2575
the answer I am getting is this:
-1977467296
instead of: 2317500000
Can you help as to why I am getting this? How can I get it to be positive and the correct answer?
Thanks so much for helping me with this trivial question. I am sure I am missing something obvious.
Geek
P.s. This is on a Linux box. (not sure if that makes a difference)