![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hell & mathematics | ogoy | Shell Programming and Scripting | 5 | 05-26-2008 07:58 PM |
| Unix File operations | nivas | Shell Programming and Scripting | 14 | 02-11-2008 02:27 AM |
| Unix file operations(shell script) | nivas | Shell Programming and Scripting | 6 | 02-07-2008 04:11 AM |
| where i can find list of UNIX commands for daily operations ? | mgoutham | UNIX Desktop for Dummies Questions & Answers | 1 | 03-02-2006 11:35 AM |
| mathematics in shell script | sureshy | UNIX for Dummies Questions & Answers | 2 | 03-21-2002 09:04 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
mathematics operations in unix
Hello guys!
Can say me anybody about operatios with unix, I don't to make operations, only inside in a variable, like this #y=4 #x=2 #let z=$y-$x #echo $z # 2 but I can't to make mathematical operations with decimal like this #y=3.2 #x=1.5 #let z=$y-$x #echo $z # 3 this operations, I get result integers. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
That's right. The shell's built-in arithmetic is integer only. Try using bc instead...
y=3.2 x=1.5 z=`echo $y - $x | bc` echo $z |
|
#3
|
|||
|
|||
|
Thanks for my question answer
I apreciate the help you gave me about my mathematic problem, it help me a lot.
Thanks Perderabo |
|||
| Google The UNIX and Linux Forums |