expr

expr - evaluate expressions.


Add two numbers using the expr command:

expr 2 + 8

Subtract two numbers using the expr command:

expr 10 - 5

Multiply two numbers using the expr command:

expr 5 \* 7

Quotient of two numbers using the expr command:

expr 15 / 3

Remainder of two numbers using the expr command:

expr 11 % 3

Shows the length of a string:

expr length LinuxCommandsExamples