How do you subtract in Shell?

How do you subtract in Shell?
Answer
The following arithmetic operators are supported by Bourne Shell.
…
Unix / Linux – Shell Arithmetic Operators Example.

Operator

Description

Example

– (Subtraction)

Subtracts right hand operand from left hand operand

`expr $a – $b` will give -10
 

Tìm kiếm

Back
Top