![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Date Calculations | mitschcg | UNIX for Dummies Questions & Answers | 8 | 03-06-2009 04:40 AM |
| Partition size calculations | Stin | SUN Solaris | 1 | 03-08-2008 09:27 AM |
| Time Calculations & Conversions | Nysif Steve | UNIX for Advanced & Expert Users | 1 | 09-14-2007 12:07 PM |
| Time Calculations | Nysif Steve | UNIX for Dummies Questions & Answers | 5 | 09-14-2007 09:49 AM |
| Float calculations | sharmavr | UNIX for Dummies Questions & Answers | 1 | 07-26-2006 03:18 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Non-integer calculations in bash
I'm new at scripting but I thought I was getting pretty good at it. I've hit a snag. I try to use expr to compute a fraction say: expr 3 / 4, and I'm getting zero. I guess it's just truncating to the integer, in this case 0, but I need the decimal 0.75. What can I do to compute this value in order to assign it to a variable?
|
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|