The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-27-2006
EDBGSK EDBGSK is offline
Registered User
 

Join Date: Oct 2006
Posts: 4
Simple Math question...

Hi All ,

I'm trying to do a simple math expression ...but unsuccessfull :-(

Anyone can help me?

days=23
amount=`expr ${days} / 30 \* -125`
echo $amount

but as result i got 0 when i expect 95.833333

Another question...how i can limit only to two or three decimal fields?

Thanks in advance
Reply With Quote
Forum Sponsor