Quick Answer: How Do You Divide in Unix?
Contents How Do You Split Two Numbers in Unix? Shell Script for Division of Two Numbers Initialize Two Variables. Divide Two Numbers Directly Using $(…) or by...
Contents
How do you split two numbers in Unix?
Shell script for division of two numbers
- initialize two variables.
- divide two numbers directly using $(…) or by using external program expr.
- Echo the final result.
Must Read
How do you split in Shell?
The following arithmetic operators are supported by Bourne Shell.
…
Unix / Linux – Shell Arithmetic Operators Example.
| Operator | Description | Example |
|---|---|---|
| / (Division) | Divides left hand operand by right hand operand | `expr $b / $a` will give 2 |