I am unable to multiply via expr. I've tried *, "", '', and plain old *
(which is a big mistake). I have this working under bash on my linux machine
and once upon a time had the scripts working on a Sun Solaris machine.
I've got the other functions, that I need, to work. Only multiplication won't.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Solution: I finally found, via google, where someone said to use
"somevariable=$((10*100))", without quotes but it does require the double set
of parentheses. This works well with $somevalue and $someothervalue, which is
how I used it. Be aware that it only works on integers.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am unable to multiply via expr. I've tried *, "", '', and plain old *
(which is a big mistake). I have this working under bash on my linux machine
and once upon a time had the scripts working on a Sun Solaris machine.
I've got the other functions, that I need, to work. Only multiplication won't.
Solution: I finally found, via google, where someone said to use
"somevariable=$((10*100))", without quotes but it does require the double set
of parentheses. This works well with $somevalue and $someothervalue, which is
how I used it. Be aware that it only works on integers.