Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

arithmetic in ksh

Status
Not open for further replies.

daveatwork

Technical User
Oct 28, 2002
3
US
Hi All:
I have a simple ksh script that I would like to add math functions to. So here is the gist of my question:

How can I get 5.2 + 6.3 to show up as 11.5. no matter what I try, typeset, variable declaration, I can't get the decimal value to show up. Any thoughts would be appreciated. thanks, Dave
 
sum=$(echo "5.2 + 6.3" |dc) vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+
 
thanks, I just found it...I think you meant 'bc'. Thanks again for your reply..
dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top