Search This Blog

Wednesday, February 4, 2009

Simple arithmatic in shell

expr op1 math-operator op2

Examples:
$ expr 2 + 3
$ expr 2 - 1
$ expr 12 / 2
$ expr 203 % 3
$ expr 15 \* 3
$ echo `expr 5 + 3`

No comments:

Post a Comment