ABSTRACT

Shell metacharacters such as * must be escaped in an expression so that they are treated literally and not as shell metacharacters. In the following session, the first expr command increments the value of the shell variable var1 by 1. The second expr command computes the square of var1. The last two echo commands show the use of the expr command to perform integer division and integer remainder operations on var1.