Menu

expr problem.

Help
2010-06-25
2012-07-26
  • bill.daluddite

    bill.daluddite - 2010-06-25

    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.

     
  • bill.daluddite

    bill.daluddite - 2010-07-01

    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.

     
MongoDB Logo MongoDB