Thursday, August 7, 2008

expr

expr is another command that is used to evaluate arithmetic expressions similar as ‘let’ command.
But expr can’t define variables.
expr command is working as following example.

num1=1
num2=2
expr $num1 + $num2


Important :
In expr command multiplication works different way. That means this is not working.
2 * 3

Have to type '\*' to get the multiplication
2 \* 3

No comments: