![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Floating Division in Linux | Dastard | Shell Programming and Scripting | 3 | 04-16-2008 12:57 PM |
| Round with division command | vanloonmichel | Shell Programming and Scripting | 13 | 02-15-2007 09:32 AM |
| division in shell scripts | esham | Shell Programming and Scripting | 6 | 11-30-2005 06:42 AM |
| Cannot adjust division | jav_v | Filesystems, Disks and Memory | 1 | 08-20-2002 08:50 AM |
| division problem | inquirer | Shell Programming and Scripting | 3 | 04-02-2002 10:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Problem in division
hi
I am having two variables namely a=7 & b=8. I have to subtract these two variables. I am using the command c=`expr $a / $b` When I check the value of c, it comes out to be zero. Please help. Regards Rochit |
|
||||
|
According to the MAN page:
Code:
expr { \*, /, %} expr
Multiplication, division, or remainder of the
integer-valued arguments.
You can use awk: Code:
nawk 'BEGIN {print 7/8}'
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|